Command Details
cat –n filename # Output line number when displayed, same as nl
cat is a shorthand for Concatenate (continuous), the main function is to have a file The content is continuously displayed on the screen.
tac (reverse display) is opposite to the display direction of Cat
nl (adding line number when displaying) It is a one-time display of data to the screen with cat, tac, etc. Page turning
Linux commands--modifying file time and creating new files
Three time states of files
Modification time(mtime) modification time
status time (ctime) status time
access time (atime) access time
The time to view with the ls -l command is mtime
touch -a only modify access Time
touch –c only modify the time without creating a file
touch –m only modify mtime
The usual use of the touch command is:
the default file permissions
If the user establishes When the file is used, there is no executable (x) permission by default, that is, only two permissions of rw (-rw-rw-rw 666)
If the user establishes the "directory", because x is possible or not Enter this directory, This default permissions are open to all, namely 777 (drwxrwxrwx)
umask specified is & ldquo; the default values need to lose privileges & rdquo ;. Since r, w, and x are 4, 2, and 1, respectively, that is, when the write permission is to be removed, 2 is entered, and when the read permission is removed, 4 is entered. Because umask is 022, user does not remove the attribute, but the attributes of group and others are removed by 2 (that is, the attribute of w)
When the user creates a file: -rw- R--r--
When creating a directory: drwxr-xr-x
How to modify umask, if you want to change to 002
Use umask command 002 to
hidden file attribute
parameters used
chattr & ndash; a : After setting, this file can only add data, not delete data
chattr –i : it can make a file "cannot be deleted, renamed, set connection, can not be written or added Data”.
lsattr & ndash; a: the hidden file property page is displayed.
Search for files
find is not commonly used, slow
whereis
locate
which (find executable file)
which –a command List all commands
whereis (find a specific file)
whereis [-bmsu]file and directory name
-b: Just find the binary file
-m: only find the file in the manual path of the help file
-s: only find the source file
-u: the file without help < Br>
Simple operation of the file system
df directory or file name
Today, I have brought the steps of adding static routes for Linux, I hope to help my friends! 1. Add
System availability can be greatly improved by hardware redundancy or software. Hardware redundancy
In Unix-like systems, you can use top to view system resources, processes, memory usage and other in
Data is the most important part of a Unix/Linux system, but backing up and synchro
How to view and modify file read and write permissions under Linux system
Linux zombie process and its solution
Apache and Tomcat clusters under Liunx
How to modify ssh default 22 port number
Linux software installation and uninstallation Basic tutorial
PXE+TFTP+DHCP network automatically boots and installs Linux
Red Hat launches Linux desktop
Ten collection systems and hardware information commands under Linux tutorial
DNF lambs big combat activities pet how to get lambs big combat activities pet speed brush Raiders
Windows7 is ignored for seven useful functions
Windows 7 can draw on 7 aspects of OS X
Linux iptables ip, Linux iptables Shield ip
An easy way to get back the search box that Win7 disappears
Two major factors occupying space under Windows 7 system
Win8/win8.1 system prompts "target folder access denied" how to do