Commands
Last updated
Last updated
Monitors a folder and checks if it increases or decreased since the last minute.
Linux
Linux
A process tree shows how processes on the system are linked to each other; processes whose parents have been killed are adopted by the init (or systemd).
Linux
journalctl
: Displays logs from the current boot session.
journalctl --boot=-1
: Displays logs from the previous boot session.
journalctl --since "2024-05-01 00:00:00" --until "2024-05-02 23:59:59"
: Displays logs within a specific time range.
journalctl _SYSTEMD_UNIT=unit_name.service
: Displays logs for a specific systemd unit (service).
journalctl _PID=1234
: Displays logs for a specific process ID (PID).
journalctl -u unit_name.service
: Displays logs for a specific systemd unit (service).
journalctl -p err
: Displays logs with a priority level of "err" (error) or higher.
journalctl -o json
: Outputs logs in JSON format.
journalctl -o short
: Outputs logs in a compact, human-readable format.
journalctl -o verbose
: Outputs logs with additional metadata.
journalctl -f
: Displays logs in real-time, similar to tail -f
.
journalctl --disk-usage
: Displays disk usage statistics of the journal.
journalctl --list-boots
: Lists all available boot sessions and their respective IDs.
journalctl --list-unit-files
: Lists available systemd unit files.
journalctl --vacuum-size=1G
: Removes old journal files until the total disk space used by the journal is reduced to 1GB.
journalctl --rotate
: Forces rotation of the journal files.
journalctl -u sshd --since "2024-05-08 16:00:00" --until "2024-05-08 18:30:00"
: Check who logged in between two times
journalctl -u Splunkd --since "2024-05-08 17:00:00" --until "2024-05-08 18:30:00":
Check Splunk logs between two times
inventory needs to be a list of hosts.
Linux
Linux
Below shows top 6 folders
Linux
Hard link is a mirror copy of the original file. Deleting the original file will not impact anything, because the hard link file, will act as a mirror copy of the original file.
A symbolic link, also known as symlink or soft link, is a special type of file that points to source file or directory in Linux. It is like a shortcut in Windows which contains the path of the original file and not the contents. In general, Symbolic links are used to link libraries and log files & folders on mounted NFS (Network File System) shares.
Linux
Linux
Linux
Linux
Linux
Linux
Linux
Linux
Linux
Linux
Linux