Adhoc Commands
This page includes a bunch of useful adhoc commands and tricks.
Create a large file
dd if=/dev/urandom of=/var/log bs=1M count=2048
Write ISO to device
dd if=image.iso of=/dev/sda status=progress
Remove Password from protected PDF
qpdf --password=changeme --decrypt secure.pdf unsecure.pdf
Generate a UUID
Find files modified in the past X days
grep -v -e '^#' -e '^$' /etc/sysconfig/sshd > /var/tmp/sshd
Find lines starting with string
grep -R ^root /etc/ 2> /dev/null > /var/tmp/results.txt
Run in background and redirect the output to file
nohup command &> output.out &
Wait for all systemd-udevd
events to finish