Monthly Archives: December 2017

Cron jobs in Linux

To create cron jobs in Linux:

Just remember the following syntax
.—————- minute (0 – 59)
| .————- hour (0 – 23)
| | .———- day of month (1 – 31)
| | | .——- month (1 – 12) OR jan,feb,mar,apr …
| | | | .—- day of week (0 – 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
| | | | |
* * * * * user-name command to be executed
1. run crontab -e
and append your command/tasks as following
i.e.
* * * * * python /etc/script.py

2. can also edit crontact file directly
vim /etc/crontab and append your tasks
i.e.
* * * * * root touch filename

To view view cron jobs in Linux:

$ crontab -l

$ cat /etc/crontab

 

Advertisements

How to burn ISO file using ‘dd’ on USB drive

Using simple dd command we can copy ISO file directly USB drive
# dd if=input_file.ISO of=usb_drive_path

To speed up transfer we can increase block size
# dd bs=8192 if=input_file.ISO of=usb_drive_path

To view progress of the transfer
Method 1 (requires GNU Coreutils 8.24+ – Ubuntu 16.04+ ):
# dd bs=8192 if=input_file.ISO of=usb_drive_path status=progress

Method 2 – using pipe viewer
# dd bs=8192 if=input_file.ISO | pv | ds of=usb_drive_path status=progress

To get time estimation based on a file size
# dd bs=8192 if=input_file.ISO | pv -s 4G| ds of=usb_drive_path status=progress

TO DO
using ‘watch’