Answer the question
In order to leave comments, you need to log in
how to use mv?
Hi all. Can you please tell me how can I move all files from a directory to a higher level?
I am in /home/devi/www/site/
In this directory, the folder is httpdocs and all its contents need to be transferred i.e. and /home/devi/www/site/httpdocs/ to /home/devi/www/site/
I do this command - mv /home/devi/www/site/httpdocs/ /home/devi/www/site/ but the error says that the directories are the same...
Answer the question
In order to leave comments, you need to log in
mv * ..
Here * is a mask for selecting all files, and .. is the designation of the parent directory.
Of course, the command must be run from the folder whose contents you want to transfer.
Your mistake is that you move the httpdocs folder to /home/devi/www/site/ but it's already there.
If you need files from the httpdocs directory to be moved, then this:
mv -r /home/devi/www/site/httpdocs/* /home/devi/www/site/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question