How to Move Files or Folders in cPanel and via Command Line Make it Rain Paper

  • cPanel File Manager, cPanel File Management
  • 0

Pre-requirements

  • Access to your cPanel account or SSH for command line usage.
  • Basic understanding of file management and file paths.

Moving Files Using cPanel File Manager

Once you have created a new web hosting account and logged in to your cPanel account, follow these steps to move files:

  1. Scroll to the Files section and click on the File Manager icon.
  2. Select the file or files you want to move by clicking on them to highlight them.
  3. Click on the Move button in the toolbar at the top of the interface.
  4. In the Move interface that appears, enter the file path where you want to move the file(s) in the "Enter the file path that you want to move this file to" text box.
  5. Click Move File(s) to move the file(s) to the new location.

Alternate Methods to Move Files

  • Drag and Drop: You can move files by dragging the file icon into the destination folder.
  • Rename Functionality: You can also use the Rename option, which will prompt you to enter a new destination for the file.

Moving Files Using the Command Line (SSH)

1. Basic File Move Command

To move a file using the command line, use the mv command. Here’s how to move index.php to the public_html/about directory:

mv -i index.php public_html/about

2. Moving Files Within a Specific Directory

If you are already in the /home/$username directory, you can move the file with this command:

mv -i public_html/index.php public_html/about && ls -al

Gotchas to Avoid

  • Double-check the file paths before moving files to avoid overwriting important files.
  • When using the command line, always use the -i flag to prompt you before overwriting files.

Moving files in cPanel or via the command line is a simple task when following these steps. You can use the File Manager interface for a more visual method, or you can use the command line for faster and more advanced file manipulation. Ensure you are familiar with file paths and use the mv command cautiously to avoid data loss.

If you want to add to this tutorial or have found an error in it, please send an email to team+editorial@webhostingm.com


Did this answer help?

« Back