I have a directory with text files in /user/data/tutorial/texts/ and I'd like to move the (sub)directory Folder2/ with all of its contents to /user/.

How should I go about this using unix commands?


The mv command moves files and directories between directories.

Assuming that you have write access to both /user (for creating new files and directories therein) and /user/data/tutorial/texts (for deleting the directory Folder2), then the following command will do what you ask for:

mv /user/data/tutorial/texts/Folder2 /user

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.