How to Upload and Extract Files in cPanel or 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 uploading and extraction processes.

Uploading 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 upload and extract files:

  1. Scroll to the Files section and click on the File Manager icon.
  2. Once inside the File Manager, click on the Upload button to bring up the file upload interface.
  3. To upload a file, either:
    • Click Select Files to choose the file from your local machine.
    • Or drag and drop the file directly into the upload interface.
  4. A green progress bar will indicate the status of the upload.
  5. Once the upload is complete, click the Go Back to “/home/username” link to return to File Manager.
  6. Ensure that you are in the correct directory.
  7. Select the uploaded compressed file, and then click on the Extract button in the top-left corner of the File Manager toolbar to extract the files.

Gotchas to Avoid

  • Make sure you are in the right directory before uploading or extracting files to avoid placing files in the wrong folder.
  • Be sure the file has fully uploaded before trying to extract it to avoid file corruption or incomplete extraction.

Extracting Files Using the Command Line (SSH)

1. Extracting a Tar File

If you prefer to use the command line, you can extract a .tar.gz or .tgz file using the following command:

tar -xzvf /path/to/foo.tgz

or

tar -xzvf /path/to/foo.tar.gz

2. Checking for Errors in an Archive

If you want to check a zip archive for errors before extraction, use the following command:

unzip -t test1.zip

3. Extracting a Zip File

To extract a zip file using the command line, use:

unzip filename.zip

Gotchas to Avoid

  • Always verify that the archive file is not corrupted before extracting, especially when using large files.
  • Ensure you have adequate disk space before extracting large archives to avoid disk space issues.

Uploading and extracting files in cPanel or via the command line is a simple and effective way to manage your website's content. Whether you prefer the graphical interface of cPanel's File Manager or the power of command-line tools like tar and unzip, the methods outlined above will help you get the job done efficiently. Just remember to check for errors and confirm you are working in the correct directory before extracting files.

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