Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd, 2017 please sign up again. Thanks!

  1. Note: we recently updated out site software, please report any unseen issues - we do this often to insure your information is secure.
    Dismiss Notice

lost file using mv command

Discussion in 'General Linux' started by CptCharis, Mar 8, 2018.

Tags:
  1. CptCharis

    CptCharis Active Member

    Joined:
    Feb 27, 2018
    Messages:
    147
    Likes Received:
    136
    Hello people!!

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



    Code:
    [email protected] ~/Desktop $ mv foo.txt /Imee
    mv: cannot move 'foo.txt' to '/Imee': Permission denied
    [email protected] ~/Desktop $ sudo mv foo.txt /Imee
    [email protected] ~/Desktop $ cd Imee
    [email protected] ~/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?
     
    #1 CptCharis, Mar 8, 2018
    Last edited: Mar 8, 2018
  2. CptCharis

    CptCharis Active Member

    Joined:
    Feb 27, 2018
    Messages:
    147
    Likes Received:
    136
    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
     
    wizardfromoz likes this.
  3. JasKinasis

    JasKinasis Well-Known Member

    Joined:
    Apr 25, 2017
    Messages:
    243
    Likes Received:
    440
    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!
     
    wizardfromoz and CptCharis like this.
  4. wizardfromoz

    wizardfromoz Well-Known Member

    Joined:
    Apr 30, 2017
    Messages:
    868
    Likes Received:
    965
    Love it when they solve their own probs ... makes 'em low maintenance :rolleyes::D

    Wiz
     
    CptCharis likes this.

Share This Page