[solved]lost file using mv command

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
captcharis
Level 1
Level 1
Posts: 26
Joined: Fri Sep 01, 2017 9:11 am
Location: Greece

[solved]lost file using mv command

Post by captcharis » Thu Mar 08, 2018 3:57 am

Hello people!!

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

Code: Select all

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 WinDlg_v1_31.zip
cptcharis@CaptaCharis-Inspiron-5323 ~/Desktop/Imee $ 
As can you see no any foo.txt file inside /Imee.
Do you have any idea what is going on?
Last edited by captcharis on Thu Mar 08, 2018 5:04 am, edited 1 time in total.
el pueblo unido jamás será vencido

User avatar
catweazel
Level 17
Level 17
Posts: 7771
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: lost file using mv command

Post by catweazel » Thu Mar 08, 2018 4:00 am

captcharis wrote:
Thu Mar 08, 2018 3:57 am
Hello people!!

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

Code: Select all

/Imee
Try /Imee/
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

captcharis
Level 1
Level 1
Posts: 26
Joined: Fri Sep 01, 2017 9:11 am
Location: Greece

Re: lost file using mv command

Post by captcharis » Thu Mar 08, 2018 4:23 am

Try /Imee/
The printout

Code: Select all

No such file or directory
el pueblo unido jamás será vencido

User avatar
catweazel
Level 17
Level 17
Posts: 7771
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: lost file using mv command

Post by catweazel » Thu Mar 08, 2018 4:34 am

captcharis wrote:
Thu Mar 08, 2018 4:23 am
Try /Imee/
The printout

Code: Select all

No such file or directory
lol ... with your original command you're moving the file to / (root) and if you look there you'll see a file called Imee

ls /

The correct command is mv foo.txt ./Imee
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

Mute Ant
Level 13
Level 13
Posts: 4945
Joined: Tue Sep 03, 2013 7:45 pm
Location: Norfolk UK

Re: lost file using mv command

Post by Mute Ant » Thu Mar 08, 2018 4:39 am

"Do you have any idea what is going on?" Yup. The original file ~/foo.txt is now in the OS root / called Imee because that's what you told it to do.

The Permission Denied error is the first-and-final warning that your attempted action threatens the OS. Using sudo to see what happens is 'unwise'.
Tommy reports the scan of zircon and opal storage is complete. When shall we go today?

captcharis
Level 1
Level 1
Posts: 26
Joined: Fri Sep 01, 2017 9:11 am
Location: Greece

Re: lost file using mv command

Post by captcharis » Thu Mar 08, 2018 4:43 am

Lol :D :mrgreen:

Thanks guys
el pueblo unido jamás será vencido

Post Reply

Return to “Newbie Questions”