Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

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!

lost file using mv command

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

Tags:
  1. CptCharis

    CptCharis Well-Known Member

    Joined:
    Feb 27, 2018
    Messages:
    251
    Likes Received:
    253
    Hello people!!


    (Log in to hide this advertisement)


    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 Well-Known Member

    Joined:
    Feb 27, 2018
    Messages:
    251
    Likes Received:
    253
    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:
    306
    Likes Received:
    586
    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 Super Moderator
    Staff Member Gold Supporter

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

    Wiz
     
    CptCharis likes this.

Share This Page