Linux Command Knowledge points

Source: Internet
Author: User

1.

Example two: Listing the details of all directories in the current directory that begin with "T", you can use the following command:

Command: Ls-l t*

Example six: Calculating the number of files and directories in the current directory

Command:

Ls-l * |grep "^-" |wc-l---Number of files

Ls-l * |grep "^d" |wc-l---directory number

2.

3.1 Example One: Enter the system root directory

Command:

CD/

Output:

[[Email protected] ~]# CD/

Note: Enter the system root directory, the above command after the execution of the LS command to see, the current directory has been to the system root directory

Command:

Cd.. or CD. //

Output :

1 [[Email protected] soft]# pwd
2/opt/soft
3 [[Email protected] soft]# CD.
4 [[Email protected] opt]# CD. //
5 [[email protected]/]# pwd
6/

Example four: Return to the directory in which it was before entering this directory

Command:

CD-

Example 2: Creating multiple directories recursively

Command:

Mkdir-p test2/test22

Example 3: create a directory with permissions of 777

Command:

Mkdir-m 777 Test3

Linux Command Knowledge points

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.