Ad hoc commands
Notes// archive From the original Code Walker docs. Kept for reference, so some versions and commands may be out of date.
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=2048Write ISO to device#
dd if=image.iso of=/dev/sda status=progressRemove Password from protected PDF#
dnf install qpdfqpdf --password=changeme --decrypt secure.pdf unsecure.pdfGenerate a UUID#
uuidgenFind files modified in the past X days#
find /dir -mtime -X Remove comments and blank lines from a file#
grep -v -e '^#' -e '^$' /etc/sysconfig/sshd > /var/tmp/sshdFind lines starting with string#
grep -R ^root /etc/ 2> /dev/null > /var/tmp/results.txtRun in background and redirect the output to file#
nohup command &> output.out &Wait for all systemd-udevd events to finish#
udevadm settle