basketmen

Well-Known Member
Sep 9, 2010
128
1
66
i want to move a file to another directory

i run the command like this
mv username.tar.gz home
i am forget add slash in the start of folder name, its should be /home



now the file is missing, cant find it anywhere
the file size is 450mb, i try run this command but still cant find it
find / -size +400M


anyone have explanation where is the file currently?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello :)

Which directory was the file stored in when you renamed it to "home"?

Thank you.
 

asmithjr

Well-Known Member
Jun 13, 2003
514
6
168
You created a file named home in the folder you ran the command in. Even though it is named home it is still a tar gzip file.

find / -name "home" -type f
this should search for a file named home
 

basketmen

Well-Known Member
Sep 9, 2010
128
1
66
Hello :)

Which directory was the file stored in when you renamed it to "home"?

Thank you.
in one of client directory, for example /home/client1
i am planning to move it to /home & use restore from full backup


You created a file named home in the folder you ran the command in. Even though it is named home it is still a tar gzip file.

find / -name "home" -type f
this should search for a file named home
ah so the file changed to /home/home folder?

i can change the folder to file again like this?
mv /home/home username.tar.gz
 

asmithjr

Well-Known Member
Jun 13, 2003
514
6
168
n one of client directory, for example /home/client1
i am planning to move it to /home & use restore from full backup
If the file is in the /home/client1 folder then you should find the file in that folder. You would then need to rename it and move it.

# move to client folder
cd /home/client1
# see if file is indeed there
ls -al home
# to make sure it is gzip compress file type
file home
# you should see something like this
home: gzip compressed data, from Unix, last modified
# now you are ready to rename the file
mv home username.tar.gz
# I would make sure you see the file now
ls -al username.tar.gz
# if so now you can move to /home
mv username.tar.gz /home

That should do it.
Now see if the file is in /home
ls -al /home/username.tar.gz


I hope this helps