lost file using mv command

CptCharis

Well-Known Member
Joined
Feb 27, 2018
Messages
563
Reaction score
465
Credits
982
Hello people!!

I made some exercises using "mv & mv -v" command but after moving of files, I couldn't locate them anymore.

Code:
cptcharis@CaptaCharis-Inspiron-5323 ~/Desktop $ mv foo.txt /Imee
mv: cannot move 'foo.txt' to '/Imee': Permission denied
cptcharis@CaptaCharis-Inspiron-5323 ~/Desktop $ sudo mv foo.txt /Imee
cptcharis@CaptaCharis-Inspiron-5323 ~/Desktop $ cd Imee
cptcharis@CaptaCharis-Inspiron-5323 ~/Desktop/Imee $ ls -l
total 624
drwxr-xr-x 3 cptcharis cptcharis   4096 Mar  2 14:31 Backup
drwxr-xr-x 2 cptcharis cptcharis   4096 Mar  6 13:36 callisthenics
drwxr-xr-x 2 cptcharis cptcharis   4096 Mar  2 14:31 GTT
drwxr-xr-x 2 cptcharis cptcharis   4096 Mar  2 14:32 WinDlg_v1_31
-rw-r--r-- 1 cptcharis cptcharis 619792 Feb 28 15:12 WinD

As can you see no any foo.txt file inside /Imee.
Do you have any idea what is going on?
 
Last edited:


I know what I did wrong

file foo.txt moved in to the root (/) and renamed as Imee
the correct command should be like this
Code:
mv foo.txt ./Imee

Newbies mistakes :(:D
 
Ha ha!
Don't worry - I think we've all been there at one point or another.

I've been using Linux for donkeys years and I still make silly mistakes like that from time to time!
 
Love it when they solve their own probs ... makes 'em low maintenance :rolleyes::D

Wiz
 

Staff online

Members online


Top