Results 1 to 5 of 5

Thread: moving a folder in terminal

  1. #1
    Join Date
    Jun 2009
    Location
    Ohio
    Beans
    57
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question moving a folder in terminal

    I had a folder named "Rage Against the Machine" in my Home directory which contained a bunch of music files. I opened my Terminal window and planned on moving it to a folder named "Downloads" inside my home folder, so I used this command:
    Code:
    sudo mv "Rage Against The Machine" /Downloads
    Now I can't actually find the folder inside Downloads, which I think it should be. so I even tried running this to find it:
    Code:
    locate "Rage Against The Machine"
    and it couldn't find it either.

    Where did it go??

    The folder size was approximately 837.6 MB in size total.
    Fix your sound problem in Ubuntu 9.10 Karmic Koala and older versions.
    http://www.fixya.com/support/r377614...blem_in_ubuntu

  2. #2
    Join Date
    Apr 2006
    Location
    Timisoara, Romania
    Beans
    132
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: moving a folder in terminal

    Looking at your command, I see that you moved "Rage Against The Machine" in the / folder, and renamed as Downloads.

    What you probably wanted to do was:
    mv "Rage Against The Machine" ~/Downloads
    I don't understand why you wanted to use sudo....
    Try to check:
    ls -l /Downloads
    to see if there is your music.

    Cheers.
    Bogdan

  3. #3
    Join Date
    Jun 2009
    Location
    Ohio
    Beans
    57
    Distro
    Ubuntu 10.04 Lucid Lynx

    Smile Re: moving a folder in terminal

    Ah thank you so much. It did rename the folder and threw it in root directory. So I used your command to rename it back and put it where I wanted, so thank you! The problem was I forgot the tilde (~) before the location to put it.
    I had to use sudo because it said something about the permissions and didn't do it, so sudo fixed that.
    Fix your sound problem in Ubuntu 9.10 Karmic Koala and older versions.
    http://www.fixya.com/support/r377614...blem_in_ubuntu

  4. #4
    Join Date
    Feb 2007
    Location
    Pittsburgh, PA
    Beans
    83
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: moving a folder in terminal

    You got a permission denied error because you were trying to create a new folder on root, even if you didn't mean to. Thus you were forced to use sudo.

    When working within your home directory, sudo won't be required.
    There are 10 kinds of people in the world, those who understand binary and those who don't.

  5. #5
    Join Date
    Jun 2009
    Location
    Ohio
    Beans
    57
    Distro
    Ubuntu 10.04 Lucid Lynx

    Arrow accidentally moved it to Root directory

    Quote Originally Posted by fjf314 View Post
    You got a permission denied error because you were trying to create a new folder on root, even if you didn't mean to. Thus you were forced to use sudo.

    When working within your home directory, sudo won't be required.
    Good to know! Thank you all!
    Fix your sound problem in Ubuntu 9.10 Karmic Koala and older versions.
    http://www.fixya.com/support/r377614...blem_in_ubuntu

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •