out of space on /root
Ralf Mardorf
silver.bullet at zoho.com
Mon Mar 6 19:56:24 UTC 2017
Indeed, "cat" usually is redundant, but what could we do, if the log
file should be a binary?
Regarding performance there's no big difference between dash and
bash, however "tail" could replace "cat", but it can't replace
"strings". To read systemd log files, the "journalctl" command could be
used, as long as it's accessible, if not, then we need to use "strings".
[root at archlinux log]# time strings journal/*/* | tail | grep 13
_SOURCE_REALTIME_TIMESTAMP=1402628901348508
real 0m30.255s
user 0m28.657s
sys 0m1.243s
[root at archlinux log]# time dash -c "strings journal/*/* | tail | grep 13"
_SOURCE_REALTIME_TIMESTAMP=1402628901348508
real 0m30.047s
user 0m28.510s
sys 0m1.347s
[root at archlinux log]# tail journal/*/* | grep 13
Binary file (standard input) matches
More information about the ubuntu-users
mailing list