P
P
Pavel Inky2015-04-24 11:54:05
linux
Pavel Inky, 2015-04-24 11:54:05

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

4 answer(s)
[
[email protected]><e, 2015-04-24
@inkyrein

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.

I
Igor, 2015-04-24
@merryjane

If you need files from the httpdocs directory to be moved, then this:

mv -r  /home/devi/www/site/httpdocs/* /home/devi/www/site/

D
Disen, 2015-04-24
@Disen

Try mv /home/devi/www/site/httpdocs/ * /home/devi/www/site/

M
Maxim Grechushnikov, 2015-04-24
@maxyc_webber

google linux mv

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question