Difference between revisions of "Limit the size of .log files & the journal"

imported>Handy
imported>Handy
Line 45: Line 45:
== The Journalctl command - a quick reference [http://www.freedesktop.org/software/systemd/man/journalctl.html]==
== The Journalctl command - a quick reference [http://www.freedesktop.org/software/systemd/man/journalctl.html]==


=== Add user to adm group, gives <user> full use of the journalctl command: ===
Note: Add user to adm group, gives <user> full use
of the journalctl command, so you don't need to use sudo
(swap "handy" for your username):
# usermod -a -G adm handy
 
Note2: You can pipe the output of journalctl to a file or
to a text display tool like "More" or "Less", as follows:
 
$ journalctl -b -p err|less
This gives you a means of avoiding the truncation of output
which some system' displays may experience.
I use a ~/.bashrc alias to make this easy:
alias errors="journalctl -b -p err|less"
When I type "errors" in the Terminal, all errors or worse,
since the last boot are displayed in the Terminal text
display tool "Less" & no lines are truncated.
Type Q to close "less".


# usermod -a -G adm handy


===== Access to full journal containing info from the system & users: =====
===== Access to full journal containing info from the system & users: =====
Anonymous user