Linux frequently used commands, not updated regularly

Source: Internet
Author: User

I. File directory and operation
1, ls: used to display a list of files and subdirectories in the current directory
Ls-a: Can list files that begin with.
Ls-s: You can display the space occupied by each file, plus the "-S" parameter, you can arrange the display by the space size
ls ${path}: A list of files and subdirectories that can display the path followed
2. CD ${Path}: Allows the user to switch to the current directory
Cd.. : Go back to the top level directory
CD ~: Back to home directory
3. mkdir: Create directory
4. RmDir: Delete Directory
5. CP: command to copy files
Cp-f/-r $[copied file] $[the path to be copied to]
Where the-f parameter means that a single file is copied, and the-R parameter is a copy folder and its subdirectories
6, MV: The command to move the file
Mv-f/-r $[moved file] $[the path to be moved to]
This command can also be used as a rename
7. RM: Delete File command
rm-f/-r $[deleted files]
RM *${deleted format} All files in this format are deleted in the current directory
8. PWD: Displays the directory where the user is currently located

ii. installation and update of files
1. Update package: sudo apt-get update (This command will update all packages)
2. Installation software: sudo apt-get install${file name}
3. Install the Deb package:Sudodpkg-i ${package name. Deb}

three . View computer Information
1. Top: View Current process
2. Cat/proc/cpuinfo: View CPU Information

Iv. Text Manipulation
1. Sed ' s/stringa1/stringa2/g ' example.txt replace "string1" in Example.txt file with "string2"

Linux frequently used commands, not updated regularly

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.