scp is safer compared to rcp, as it encrypts the whole file. However, it will cause a considerable load on the server.
Scp functions pretty much like cp command used for copying files.
Here is the format for scp command:
$ scp user@source.hostname:source_filename user@destination.hostname:dest_dir/dest_filename
Most of the time, there’s no need to put the hostname if you’re copying the local file.
$ scp source_filename user@destination.hostname:dest_dir/dest_filename
There is also no need to put user@, if the source and the destination is the same machine.
Some more examples:
You are logged into abigail and transferring a file from benjamin to abigail. You’re in your home directory in abigail, the file.dat is the filename.
abigail$ scp username@benjamin.hostname:file.dat .
Transferring file.dat in your current directory on benjamin to abigail in the data directory and not changing the name of the file.
benjamin$ scp file.dat username@abigail.hostname:data/
The following is the same of above but changing the file.dat name at the destination directory
benjamin$ scp file.dat username@abigail.hostname:data/
You’ll be asked for your password, like you’re logging in to the remote machine. The tranfer will run right after the correct password keyed-in.
This blog started with my curiosity about Linux and its variants (Red Hat and Ubuntu primarily). Last year, I started my new company; as a result, I focused back on this network security and be more focus than ever before. Hopefully, my posting will bring benefits and joy to those who read them. Cheers,
Saturday, March 8, 2008
Thursday, March 6, 2008
Some Useful Yum Commands
The yum utility keeps downloaded data files and packages for reuse. You may copy packages from the repository cache directories under /var/cache/yum/, and use them elsewhere if you wish. If you remove a package from the cache, you do not affect the copy of the software installed on your system.
To install the package tsclient, enter the command:
su -c 'yum install tsclient'
To install the package group MySQL Database, enter the command:
su -c 'yum groupinstall "MySQL Database"'
To remove the tsclient package from your system, use the command
su -c 'yum remove tsclient'
To remove all of the packages in the package group MySQL Database, enter the command:
su -c 'yum groupremove "MySQL Database"'
To install the package tsclient, enter the command:
su -c 'yum install tsclient'
To install the package group MySQL Database, enter the command:
su -c 'yum groupinstall "MySQL Database"'
To remove the tsclient package from your system, use the command
su -c 'yum remove tsclient'
To remove all of the packages in the package group MySQL Database, enter the command:
su -c 'yum groupremove "MySQL Database"'
Subscribe to:
Posts (Atom)