I had a directory with a file and another empty directory in it like this:
.
..
file.ext
folder
I did:
mv file.ext /folder
The file disappeared now, not in folder too not where it was before!
Anyway to find it back?
Thanks
command linefilesmv
I had a directory with a file and another empty directory in it like this:
.
..
file.ext
folder
I did:
mv file.ext /folder
The file disappeared now, not in folder too not where it was before!
Anyway to find it back?
Thanks
Best Answer
If the directory
/folder
(under root directory,/
) does not exist, and if you were working asroot
, you have renamed (moved) the filefile.txt
asfolder
under/
.Doing a
ls -l /folder
should show you the file.Another point is, if a directory
/folder
does exist, then look under that directory for the file i.e./folder/file.txt
.Also note that if you append a
/
to the destination path, you would get a different message like:and the file will not be renamed.
For example: