This page shows a number of commands which are useful when using a Raspberry Pi.
The following command will duplicate the contents of the source directory into the destination directory. Niote that this command will also delete files from the destination if they have been deleted from the source. This command can be added as a Cron job to provide a simple RAID type system.
sudo rsync -av --delete /Source/ /Destination
dd if=/dev/zero of=./TestingFile bs=100M count=10 oflag=direct
dd if=./TestingFile of=/dev/zero bs=100M count=10 oflag=async
Each “yes” command will load a single processor core, run it four times to load all four cores.
yes &>/dev/null &
yes &>/dev/null &
yes &>/dev/null &
yes &>/dev/null &
killall yes
Right click the clock in the menu bar and change the format to “%I:%M %P”
The preserve=timestamp option will ensure the copied file has the same time/date as the source file, rather than the time/date it was copied.
sudo cp --preserve=timestamp /etc/fstab /backup-folder
sudo cp --preserve=timestamp /etc/samba/smb.conf /backup-folder
sudo smartctl -A /dev/sda | grep Temperature
vcgencmd measure_temp
cat /sys/devices/platform/cooling_fan/hwmon/*/fan1_input
cat /etc/os-release | grep "PRETTY"
cat /proc/device-tree/model
sudo fdisk -l
The following commands can be used to list or edit the cron jobs for the sudo (root) user:
sudo crontab -l
sudo crontab -e