Linux Learning Exploration File system

Source: Internet
Author: User
Tags geoip tmp file

Linux, Learning progress together ~

Ls

With it, we can see directory contents and determine a variety of important file and directory attributes.

With it, we can see the contents of the directory, the important file and directory attributes

~~

Besides the working Directory,we can specify the directory to List,like so:

In addition to the current working directory, you can specify a different directory, like this:

ls./coden-chat crawl-info muying npm_ref_wf_test testcn_admin_backendgeoip-cn node-~

  

Or even specify multiple directories. In this example we'll list both the user's home directory (symbolized by the "~" character) and the Code directory:

You can even list the contents of multiple directories, in this example, the contents of the home directory and the code directory are listed:

~ ls ~./code./code:n-chat crawl-info muying npm_ref_wf_test testcn_admin_backend geoip-cn node-GeoIP npm_ test999 tmpcn_backend mail_test nodeclub personal zhongzhong/users/shining3d-~

  

Most commands with options consisting of a single character preceded by a dash, for example, "-L", but many commands, inclu Ding those from the GUN project, also support long options, consisting of a word preceded by and dashes. Also, many commands allow multiple short options to be strung together. In this example, the LS-command is given-n options, the "L" options to produce long format output, and the "t" option to Sort the result by the file ' s modification time.

Most commands use an underscore with one character, such as "L", but many commands, including commands from the UGN project, also support the long option, which consists of two dashes plus one word. Of course, many commands allow for use with multiple short option strings. The following example has two options, "L" produces a long format output, and "T" gets the result sorted by the order of the modified time.

  

? ~ LS-Lttotal0drwx--+ SHINING3D-FYQJ Staff 1700 10 28 11:13DOWNLOADSDRWXR-xr-x 8 SHINING3D-FYQJ Staff 272 10 27 10:38COMPANYDRWXR-xr-x 4 SHINING3D-FYQJ Staff 136 10 26 17:20VirtualBox vmsdrwxr-xr-x 4 SHINING3D-FYQJ Staff 136 10 26 16:44systemdrwx--@SHINING3D-FYQJ Staff 1802 10 26 16:26LIBRARYDRWXR-xr-x SHINING3D-FYQJ Staff 612 10 26 14:03codedrwx--+ 5 SHINING3D-FYQJ Staff 170 10 21 11:07PICTURESDRWXR-xr-x 9 SHINING3D-FYQJ Staff 306 10 20 16:35DOCDRWXR-xr-x 4 SHINING3D-FYQJ Staff 136 10 20 14:41builddrwx--+ 4 SHINING3D-FYQJ Staff 136 10 16 09:14musicdrwx--+ 5 SHINING3D-FYQJ Staff 170 9 24 15:24desktopdrwx--+ SHINING3D-FYQJ Staff 340 9 21 14:55documentsdrwx--4 SHINING3D-FYQJ Staff 136 8 17 10:31applicationsdrwx--+ 3 SHINING3D-FYQJ Staff 102 8 17 10:26MOVIESDRWXR-xr-x+ 5 SHINING3D-FYQJ Staff 170 8 17 10:26Public ?~

We ll add the long option "–reverse" to reverse the order of the sort:

The resulting result also has the Delete permission information

? ~ Ls-lt-Reversetotaldrwxr-xr-x+ 5 SHINING3D-FYQJ Staff 170 8 17 10:26 Public0:group:everyone denyDelete0 drwx--+ 3 SHINING3D-FYQJ staff 102 8 17 10:26Movies0:group:everyone denyDelete0 drwx--4 SHINING3D-FYQJ Staff 136 8 17 10:31Applications0 drwx--+ SHINING3D-FYQJ Staff 340 9 21 14:55Documents0:group:everyone denyDelete0 drwx--+ 5 SHINING3D-FYQJ staff 170 9 24 15:24Desktop0:group:everyone denyDelete0 drwx--+ 4 SHINING3D-FYQJ staff 136 10 16 09:14Music0:group:everyone denyDelete0 Drwxr-xr-x 4 SHINING3D-FYQJ staff 136 10 20 14:41Build0 Drwxr-xr-x 9 SHINING3D-FYQJ Staff 306 10 20 16:35Doc0 drwx--+ 5 SHINING3D-FYQJ staff 170 10 21 11:07Pictures0:group:everyone denyDelete0 drwxr-xr-x SHINING3D-FYQJ Staff 612 10 26 14:03Code0 drwx--@ SHINING3D-FYQJ Staff 1802 10 26 16:26Library0:group:everyone denyDelete0 Drwxr-xr-x 4 SHINING3D-FYQJ staff 136 10 26 16:44system0 Drwxr-xr-x 4 SHINING3D-FYQJ staff 136 10 26 17:20VirtualBox VMs0 Drwxr-xr-x 8 SHINING3D-FYQJ staff 272 10 27 10:38 Company0 drwx--+ SHINING3D-FYQJ Staff 1700 10 28 11:13Downloads0:group:everyone denyDelete? ~

  

File

As we explore the system it would be useful to know what files contain. To does this we'll use the file command to determine a file ' s type. We can invoke the file command this is:

As the discovery file system progresses, it is useful to know the file information, which can be used for this purpose. We can call it this way:

? tmp file Server.jsserver.js:UTF-8 Unicode text

To learn more, please async my blog.

Linux Learning Exploration File system

Related Article

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.