Results 1 to 5 of 5

Thread: how to move files, sudo command

  1. #1
    Join Date
    Jul 2009
    Beans
    32

    how to move files, sudo command

    I am trying to move a html file to var/www, but i don't have permission. does anyone know the sudo command I can use move files from on folder to another?
    thanks

  2. #2
    Join Date
    Jun 2008
    Location
    UK
    Beans
    1,063

    Re: how to move files, sudo command

    mv /pathToFile/fileToMove /pathToNewLocation/

    mv /pathToFile/fileToMove /pathToNewLocation/newFileName

    mv -r /pathToFile/folderToMove /pathToNewLocation/

    mv -r /pathToFile/folderToMove /pathToNewLocation/newFolderName

    Hope this helps

  3. #3
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,573
    Distro
    Ubuntu

    Re: how to move files, sudo command

    Code:
    sudo mv file/you/want/to/move.html /var/www/

  4. #4
    Join Date
    Jul 2009
    Beans
    32

    Re: how to move files, sudo command

    cheers, that worked well

  5. #5
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: how to move files, sudo command

    Note that you can use "cp" to copy, rather than "mv" to move, if you want.

    If you're using a GUI, you can open a file browser as root and then you'll have permissions to drag and drop files into that folder:

    Code:
    gksudo nautilus
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

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
  •