Even if I often google, there are many links that I forgot after all, and I feel the importance of recording and summarizing googles.
In the first place, there must have been a lot of sites full of tricks that were buried in the history without remembering "What kind of word did you google?", I will share it as an article so as not to forget it I will try.
$ awk '/2014-01-01 21:/' log.txt; tail -f log.txt
$ grep 'grpup-name-here' /etc/group
It is convenient to install a module called members
$ members ftponly
$ sudo ls -lhSR / | grep -v '^d' | head -10
** Extract the following CSV name column **
sample.csv
name,age
hoge,10
fuga,12
bar,14
# tail -n +2 $1 Skip the first line and display from the second line
$awk -F, '{ print $1 }' sample.csv | tail -n +2 $1
#10 lines
$ head -10 bar.txt
#20 lines
$ head -20 bar.txt
grep -r '[Character string]' /【Folder name】
$ cut -d ',' -f 3,5,7 kawasaki_koukai.csv | sort -n -r -t ',' -k 3 | head -n 10
--2019/12/09 Created this article --2019/12/10 Added awk tricks --2020/1/19 Added cut and grep tricks
Recommended Posts