Moving and copying files using SSH

Often you will move or copy the files from different location.This can be done using ssh

The two command which we going to use is mv and cp

the syntax for move command is

mv config-dist config

Alternatively you can move whole directory and its content

mv includes/* ./

This will move all files (and folders) in the includes/ directory to the current working directory

copy command.

The copy cp command is also same as the mv but instead of moving the files/folders it copies them

for example

cp configuration-php configuration

The command will copy the configuration.php-dist file to configuration.php and will keep the original file .

Leave Your Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.