Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialANIKET KUWAR
1,179 PointsHi, What is the command to copy a file from one location to another ? I tried using cp (src, dst).
I want to move a file from one location to other. I am not able to do so using cp (src, dst). Can anyone please help with the proper command which would move file from one location to other?
Caleb Kleveter
Treehouse Moderator 37,862 PointsAre you trying to change the location of the file using the console?
1 Answer
Garrett Carver
14,681 PointsThis is a general console question. Check out the treehouse course on this subject!
copy a file:
cp
sourcefile destinationdirectory
move a file:
mv
sourcefile destinationdirectory
rename a file:
mv
sourcefile destinationfile
(essentially this copies the original file to the destination, wherever that may be, and removes the original)
James Attree
7,906 PointsJames Attree
7,906 PointsIs this a Ruby related question?