Linux Basic Command Introduction-2

Source: Internet
Author: User

The previous article describes two commands for two comparison bases:

Pwd

Cd


In fact, CD This command, there is a more common usage, that is: CD-

This is the most recent use of the directory, like a TV remote control on a function, switch to the previous program, that is, two programs to switch back and forth. Here is the current directory and the last directory to switch back and forth, it is more commonly used! Look directly at the effect!

650) this.width=650; "Src=" https://s5.51cto.com/wyfs02/M01/8E/61/wKiom1i-vrCQXH6EAAAtomNPo_Q831.png-wh_500x0-wm_ 3-wmp_4-s_73165895.png "title=" 2017-03-07_22h06_50.png "alt=" Wkiom1i-vrcqxh6eaaatomnpo_q831.png-wh_50 "/>

Why this is a function, in fact, because there are two environment variables:

One is: $PWD This represents the current working directory

One is: $OLDPWD This represents the last working directory


Next, learn the new commands:

ls = list, listing the contents of the specified directory, with the following syntax rules:


ls [OPTION] ... [FILE] ...


option is the value of options, which are commonly used:

    1. Does not take any option to display the file under the development directory.

    2. -A: Displays all files under the specified directory, including hiding my files. Comparing the above, you can find some more files.

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/8E/61/wKiom1i-wySBMVVtAAAqwZajJWc894.png "title=" 2017-03-07_22h25_46.png "alt=" Wkiom1i-wysbmvvtaaaqwzajjwc894.png "/>

3.-A: Display except. And.. Except for all my files.

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/8E/61/wKiom1i-w4egv7Z7AAA6V7Qp89w364.png "title=" 2017-03-07_22h28_00.png "alt=" Wkiom1i-w4egv7z7aaa6v7qp89w364.png "/>


4.-l:--long, long format list, display detailed property information of the file

-rw-r--r--. 1 root root 14150 Mar 7 05:04 Boot.log

- : Leftmost-Represents the file type, common to have such a few:-, D, B, C, L, S, p next will come out alone.

rw-r--r-- : A group of 3 characters, altogether 3 groups, the next one is about what the 3 groups mean.

rw-: File Owner's permissions

r--: Permissions for file groups

r--: Permissions for other users (not owner, group)

1 : number indicates the number of times a file has been hard connected.

Root : File owner

Root : File group

14150 : Numbers represent the size of a file, in bytes

Mar 7 05:04 : The last time the file was modified

boot.log : File name

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/8E/5F/wKioL1i-x47yU3euAAAuLAAikbw748.png "title=" 2017-03-07_22h45_08.png "alt=" Wkiol1i-x47yu3euaaaulaaikbw748.png "/>


5.-H:--human-readable: For file size unit conversion, the result may be a non-accurate value after conversion. It is generally used in conjunction with-L.

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/8E/5F/wKioL1i-x-OyMybXAAAtOr_T3Fk650.png "title=" 2017-03-07_22h46_38.png "alt=" Wkiol1i-x-oymybxaaator_t3fk650.png "/>


6.-D: View the directory's own properties without displaying a list of its internal files, generally in conjunction with-L.

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/8E/61/wKiom1i-yOCwTn1dAAAOeXBJCOE229.png "title=" 2017-03-07_22h50_50.png "alt=" Wkiom1i-yocwtn1daaaoexbjcoe229.png "/>


7.-r:reverse, reverse display. See if the reverse is shown, this option is useful when the file list is long.

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/8E/61/wKiom1i-yUqTe13hAABdz88H5Xw290.png "title=" 2017-03-07_22h52_36.png "alt=" Wkiom1i-yuqte13haabdz88h5xw290.png "/>


8.-r:recursive, recursive display, look at the effect.

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/8E/61/wKiom1i-ynWTWuEvAAClYzXdwmo685.png "title=" 2017-03-07_22h56_34.png "alt=" Wkiom1i-ynwtwuevaaclyzxdwmo685.png "/>


Other options, you use the man LS to see it, there are detailed use of the introduction.

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/8E/5F/wKioL1i-yvLA0uXQAACrW8qgtrM362.png "title=" 2017-03-07_22h59_38.png "alt=" Wkiol1i-yvla0uxqaacrw8qgtrm362.png "/>


Well, let's review this order today! Continue tomorrow.

This article is from the "bitter Siege Master's Notes" blog, please be sure to keep this source http://jiaszwx.blog.51cto.com/10565760/1904138

Linux Basic Command Introduction-2

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.