Skip to content

Managing Files#

Moving / Copying a File to a New Location on Bucket#

There are two commands for moving and copying: mv and cp.

  • Copy a file from one directory to another: cp [path]/file-name [new-location]
  • Move a file from one directory to another: mv [path]/file-name [new-location]

Move a file from one directory to another:

  1. Connect to VPN.
  2. In terminal, log into the server.
  3. CD into root: cd /
  4. Check your directory to verify you’re in PLIE09 root: pwd
  5. Look-see what is in the folder: ls -la
  6. Go to data/www: cd data/www
  7. Look-see what is in the folder: ls -la
  8. Move your file out of the old bucket and into assets folder: mv easy-reader-dot-blue.jpg ../../assets/images/easy-reader-dot-blue.jpg

Change Permissions on a File or Directory#

  • Change permissions for a single file or directory: sudo chown apache:apache [name of file or folder]
  • Change permissions for all the files in a directory: sudo -R chown apache:apache [name of folder]