Some of the most commonly used Linux command finishing

Source: Internet
Author: User


1. Implementation of remote and local file copies using SCP

Copy the local files to the remote machine
Scp/path/file.txt User@ip:/home/user
(If it is a Windows machine, then Scp/path/file.txt user@ip:d:/path/file)
Copy the files on the remote machine to the local
SCP User@ip:/home/user/file.txt/home/user
If you want to use a specific port using scp–p (uppercase) such as SCP–P 1234 User@ip:/home/user/file.txt/home/user
If you need to copy the entire directory, add-r parameters such as Scp–r user@ip:/home/user//home/user/

2.linux Disk Management Command –du

DU-SH lists the amount of space occupied by the current directory, the-s does not contain the size of subdirectories, and-H is shown in general reading, such as 11G, not 11534336

3. View Linux Process

Ps-aux | grep JBoss to view the commands of the JBoss process. grep is followed by a regular expression that indicates that a process containing jboss was searched from the previous command Ps-aux.

4. Find Files command: Found

Find Pathname-options [-print-exec-ok ...]
Options common parameters are: name (filename),-mtime-n +n (file change time), type (file type: B block device file; d directory; C character device file; p pipeline file; l symbolic link file; F normal file)

5. Find the strings that match the criteria in the file: grep

6. View CPU Information Cat/proc/cpuinfo
7. How long does the display system run: Uptime
8. View the currently logged-on user and server Load:w
9. Kill a process: killall-9 process_name or kill-9 pid
10. View recently logged in User: last
11. Disk usage in file system: DF-MT

12. View Memory Usage free

Free-m-S 5-c 5, in megabytes per 5s output memory usage, a total output of 5 times.
Where the-m parameter shows the MB, the-s parameter shows the latency (for constant output), the-c parameter indicates the number of outputs

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.