Since I will be doing log surveys in my business, I have summarized the commands that I often use at that time.
This command searches for a character string in a file.
grep option"Search string"file name
Option name | Description |
---|---|
-v | Search for inconsistencies |
-e | Use the specified regular expression for match processing |
This command splits a text file horizontally.
You can specify the required number of bytes or get the contents of the file with the delimiter.
cut option filename
Option name | Description |
---|---|
-v | You can specify the delimiter |
-e | You can specify the required items by the number of items |
A command that allows you to sort the data in ascending order.
sort filename
This command allows you to delete duplicate rows in a pre-sorted state with sort.
uniq filename
This command is used to copy files between a remote machine and a local machine, or between remote machines.
scp username@Remote host name:Remote files you want to copy Local copy destination
Recommended Posts