Copying files and folders is possible using Hostinger File Manager:
If you would like to copy files and folders with SSH, all you need to do is:
Step 1 - Connection
First, enable SSH access and connect to your account using SSH. Open the directory, where the files and folders, which you want to copy, are located. For that:
Run
ls
command. If you see the needed files and folders, then you can go to Step 2If the needed content is in a subdirectory, reach it by running:
cd path/to/files
where "path/to/files" is changed by an actual path to your files. For example, if your files are located in public_html/new/version1, then the command should be "cd new/version1".
Step 2 - Copying
You only need 1 command to copy files or folders, just chose the option the most suitable for you:
Just make a copy of the file:
cp filename
Make a copy and rename the copied file:
cp filename.php newfilename.php
Move the copied file to a separate directory:
cp filename.php destination_directory/
Copy the whole folder and rename it:
cp -R foldername/ newfoldername/
Copy the files to another directory and replace the existing ones
cp -f filename.php destination_directory/
That’s it! Now you know how to copy files and folders using SSH 😊
NOTES: