Results 1 to 6 of 6

Thread: Moving picture folder out of Root user

  1. #1
    Join Date
    May 2008
    Beans
    57

    [SOLVED] Moving picture folder out of Root user

    I recently had to recover a partition with pictures on it. Shotwell did a great job, but put all the pictures in the root user's picture folder. I am trying my hardest to move the picture folder over to my current user's pictures directory. The user has an empty picture folder, so no need to worry about overwriting. Here is what I'm trying.

    Code:
    user@computer:~$ gksudo mv -r ~/Pictures/ /user/Pictures/
    It thinks for about 5 seconds, and gives no error message. But alas, the user's picture folder is empty. I thought using the '-r' option meant recursive, but no pictures are showing. Hrm. So I tried the following.

    Code:
    user@computer:~$ mv -r ~/Pictures/ /user/Pictures/
    mv: invalid option -- 'r'
    Try `mv --help' for more information.
    Now I'm confused. I thought '-r' was an option for moving. Correct?
    Last edited by toastermm; August 19th, 2011 at 05:35 AM.

  2. #2
    Join Date
    Jun 2007
    Location
    Poughkeepsie, NY
    Beans
    5,810
    Distro
    Ubuntu

    Re: Moving picture folder out of Root user

    nope -r isn't maybe your thinking of rm command.

    and just use sudo, no need for gk.

    Code:
    sudo mv /pictures /home/user/pictures

  3. #3
    Join Date
    May 2008
    Beans
    57

    Re: Moving picture folder out of Root user

    Thanks for the quick reply. Changing to sudo and using no -r option gives...

    Code:
    user@computer:~$ sudo mv /pictures/ /home/user/pictures/
    mv: cannot stat `/pictures/': No such file or directory
    I'm not sure how to reference the root user without gksudo. I can see the pictures if I type in "gksudo nautilus" and browse to the pictures folder in root. I just would like to move them to the user directory.
    Last edited by toastermm; August 19th, 2011 at 05:28 AM. Reason: copied wrong command: fixed now.

  4. #4
    Join Date
    Apr 2009
    Location
    Tennessee, USA
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Moving picture folder out of Root user

    sudo is to reference root for command line programs, gksudo is for graphical apps (In Gnome). Are you sure you got the case correct for the folder you're trying to move? Linux is case-sensitive.
    Help me out! Go make a dropbox account from this link to get me more space! https://www.dropbox.com/referrals/NTU2ODUyNDY5 (You get the bonus space too!)

  5. #5
    Join Date
    May 2008
    Beans
    57

    Re: Moving picture folder out of Root user

    Got it.

    First changed to root:

    Code:
    user@computer:~$ su -s
    root@computer:~# mv /root/Pictures /home/user/Pictures
    Done. Thanks for the help- finally figured it out.

  6. #6
    Join Date
    Aug 2006
    Beans
    13,354
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Moving picture folder out of Root user

    The problem now is that the 'Pictures' folder and content are owned by root and you can't modify them. To change the ownership, run the following as user, not as root:
    Code:
    sudo chown -R $USER:$USER /home/$USER/Pictures

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
  •