Linux SSH commands

Source: Internet
Author: User
Common commands: Rm-RF mydir/* Delete the mydir directory */

CD mydir/* enter the mydir directory */
CD-/* Go back to the upper-level directory */
Cd ~ /* Return to the root directory */
MV tools tool/* rename the tools directory to tool */
Ln-s tool bac

/* Create a symbolic link named BAC for the tool directory. The most familiar thing is that WWW in FTP is linked to the public_html directory */

CP-a tool/home/leavex/www/* Copy all files in the tool directory to the WWW directory */
RM go.tar/* Delete the go.tar file */
Find Mt. CGI/* find the file name Mt. check the remaining disk space in the CGI File */
DF-H/*. It seems unnecessary, unless you are too specific */
tar xvf wordpress.tar/* decompress the tar Format File */
tar-tvf myfile.tar/* view the files contained in the TAR file */
gzip-D ge.tar.gz/* examples file */
unzip phpbb.zip/* Others format files are still a bit troublesome */
tar CF toole.tar tool/* pack the toolcatalog as toole.tar file */
tar cfz geek.tar.gz tool
/* The variable file is about 10 MB */

wget http://www.sevenapart.com/download/wp.tar.gz
/* download files from the remote server to your server, even the upload is saved, and the server bandwidth is Mbps or Mbps, it's not tens of seconds to download a 2-3 MB Mt */
wget-C http://www.eightapart.com/undone.zip
/* continue to download the last undownloaded file */

Tar cfz geek.tar.gz Tool
/* The size after the upload file is about 10 MB */


Upload/download files using the SSH command line

Upload:

SCP/path/file (local path) user (remote target user name) @ host (remote target IP address):/pathorfile (file storage path)


Download:

SCP user (remote user name) @ host (remote IP address):/path/file (remote path for downloading files) localpathorfile (local file storage path)


View directories or files:

SSH user @ host command ls "/path/*. tgz"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.