Linux command-view file content

Source: Internet
Author: User
Label: cat: displays the file content starting from the first line; tac: displays the content starting from the last line. it can be seen that tac is in the opposite alphabetical order of cat; nl: displays the output row number when displaying; more: the content of the file is displayed on one page. less is similar to more, but it can flip forward. head: only the first few rows...

When a user creates a file:-rw-r --
When creating a directory: drwxr-xr-x

How to modify umask, for example, to change to 002
Run the umask 002 command.
File hiding properties
Chattr (set file hiding attributes)
Common parameters
Chattr-a: After setting, only data can be added to the file, but data cannot be deleted.
Chattr-I: it can make a file "cannot be deleted, renamed, set connections, and cannot be written or added to data ".
Lsattr (display the hidden attributes of a file)
Lsattr-a: displays the property pages of hidden files.
Search for files
Find is not commonly used and is slow
Whereis
Locate
Which)
Which-a command lists all commands
Whereis (find a specific file)
Whereis [-bmsu] file and directory name
-B: only binary files are available.
-M: only find the file in the manual path of the help file.
-S: only find the source file
-U: No Help File
Simple file system operations
Df directory or file name

 

This article is from "Steven Home"

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.