Where I am? it shows the full path
Move into another directory
$ cd /var/www/vhosts/example.com/conf/
$ cd ..
$ cd ~
Show all files and hidden files.
$ mv logo.png image/logo.png
$ mv logo.png logo_new.png
Copy file or duplicate file
You can also copy an entire folder (along with all subfolders) using -R:
$ cp logo.png image/logo.png
$ cp index.php index.php_old
$ cp -R image/ image2
Type y confirm, or n to cancel. If you don't want to be prompted, add -f to the command
$ rm index.php_old
$ rm -f index.php_old
Please be cautious with the rm -rf command.
To make sure you're deleting the right thing, you can always run a list command first. For example:
$ ls -alh /path/to/unwanted/folder/
$ rm -rf /path/to/unwanted/folder/
$ eval ssh-agent
$ ssh-add ~ /.ssh/id_rsa
$ ssh-copy-id user@123.45.56.78
Alternatively, you can paste in the keys using SSH:
$ cat ~ /.ssh/id_rsa.pub | ssh user@123.45.56.78 " mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Create public and private keys
$ ssh-keygen -t rsa -b 4096 -C " your_email@example.com"
Exporting SQL (Backup SQL)
$ mysqldump -u database_name -p database_user > anyname_backup.sql
$ mysql -u database_user -p database_name < anyname_backup.sql
ZIP an entire folder including subfolders and files
$ zip -r myarchive.zip myfolder
To UNZIP an archive type:
To TAR an entire folder including subfolders and files:
# tar -cpzf myarchive.tar.gzs * .htaccess
To UNTAR an archive type:
# tar -xpzf myarchive.tar.gzs