Linux basic commands

Source: Internet
Author: User

Simple command:
cd [File]
Touch [file name]
mkdir [Create directory] mkdir-p [Multilayer directory] recursively create a directory
RM [Delete a file]

ls--help Display Help information for the command
man   instructions for displaying commands

CD ~ Switch to the current user directory/home/ Python
CD   
CD.   Keep current directory
CD. Switch to parent directory

tree [contents]

Delete command:
Rm-r Plus-R to delete folders
Rm-f Force Delete Does not prompt
RM-RF * Delete all folders and files in the directory


However, wildcard characters are not removed. Hide File

copy:
CP   
Cp-i prompt before overwriting file Br> Cp-r                             

move:
mv   source file Target file           move file or directory/file or directory rename
mv-i                             Prompt before overwriting a file

View:
Cat file name View the contents of a file, output everything at once, suitable for viewing less content text files
Cat-n Show labels for all rows

More file names split screen display content

grep search text file name
Grep-n Display matching line numbers and lines
Grep-v negation (mismatch)
Grep-i ignoring case

linux under:
1, file or folder name longest 256 characters
2, with. Start with a hidden file that needs to be displayed with-a
3,. Indicates the current directory
wildcard
4, * denotes any number of characters
5,? Represents a character
6, [] can match [ Any one of the

7. ^a begins with a
8. b$ ends with B

parameters of LS:
ls-a Show Hidden
ls-l displayed in list mode
ls-h Display File size
redirect ;
> represents the output, overwriting the original contents of the file
>> indicates append
echo Content > Documents

Commands >> Documents

Pipe: The output of one command, as input to another command, is processed by the latter pipeline and can be nested in multiple layers

Demo:ls-l | grep do
Finds the contents of do on the execution result of the command and displays


File systems under Linux:


/bin executable binary files directory such as/usr/bin

/ect directory for System configuration files

/home/home/laowang Or/home/suqin /home/suqin/desktop
/
/lib Directory of function libraries used by the system/usr/lib

The directory that the/USR application holds/usr/bin/usr/share

/dev Store device files under Linux

...

/home/python User Directory / Home User House Directory

Linux basic commands

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.