Home>Article>Operation and Maintenance> linux open file command
Linux command to open a file
Command to view file contents:
cat
Displays content starting from the first line and outputs all contents
tac
Displays content from the last line in reverse order and outputs all contents
more
According to the window size, the actual file content page by page
less
is similar tomore
, but its advantage is that you can turn pages forward, and You can search for characters
head
Only the first few lines are displayed
tail
Only the last few lines are displayed
nl
Similar tocat -n
, output line number when displayed
tailf
Similar totail -f
Recommended related video tutorials: "Linux Tutorial"
The above is the detailed content of linux open file command. For more information, please follow other related articles on the PHP Chinese website!