PDA

View Full Version : [ubuntu] mv error message



salim.madni
May 25th, 2009, 02:33 PM
dear gurus

i had try to move directory but it give me error can u tell mw what should i try for

root@mx1:/var/opt/backup/var/opt/axigen# mv /var/opt/backup/var/opt/axigen/* /var/opt/axigen


mv: cannot move `/var/opt/backup/var/opt/axigen/ctasd' to `/var/opt/axigen/ctasd': Directory not empty

regards

_Purple_
May 25th, 2009, 03:00 PM
Did you have ctasd inside /var/opt/axigen/ directory before moving the files?

Alekz_
May 25th, 2009, 05:19 PM
dear gurus

i had try to move directory but it give me error can u tell mw what should i try for

root@mx1:/var/opt/backup/var/opt/axigen# mv /var/opt/backup/var/opt/axigen/* /var/opt/axigen


mv: cannot move `/var/opt/backup/var/opt/axigen/ctasd' to `/var/opt/axigen/ctasd': Directory not empty

regards

If you intend to move a "directory", you must use '-R'!


mv -R /your/path/ /destiny/

PS.: '-R' means recursive

[]'s

_Purple_
May 25th, 2009, 05:42 PM
If you intend to move a "directory", you must use '-R'!


mv -R /your/path/ /destiny/

PS.: '-R' means recursive

[]'s

The -R option is not available with mv. By default mv moves all the subdirectories as well.

Alekz_
May 25th, 2009, 05:48 PM
Sorry! My mistake! ;p

Forget about what I said... '-R' is for `cp`, not `mv`! :(

_Purple_
May 25th, 2009, 05:52 PM
No problem. We all make mistakes. :)

salim.madni
May 28th, 2009, 08:58 AM
hello gurus

as i said you, on the source these folders are exists and on the desitnation it is not there, and on the source there is data/files/subfolder inside.

so everytime i try it get failed....

by giving your all option it moved only EMPTY FOLDERS FROM 1location to another location moved only.

can you advise what thing could be missing or any parameter files or folders issues.

this was original .tar.gz i unzip then start moving all files/folders from one to another location. but empty moved sucessfully and data occupied failure.

can you drill down more on this

regards
salim

_Purple_
May 28th, 2009, 09:21 AM
Hi Salim,
Try to use copy

cp -r /var/opt/backup/var/opt/axigen/* /var/opt/axigen