Show progress during dd copy

Ok, this is actually a copy and paste post thus credit is due where credit is deserved: Linux Commando.

The quick-and-dirty trick: open a new terminal and enter:

$ kill -INFO <PID of dd process>

NOTE: do not use USR1 on Mac OS X!

The “output” will be printed on the console where dd is actually running:

$ dd if=/path/to/file of=/dev/sdb1 bs=1M
0+14 records in
0+14 records out
204 bytes (204 B) copied, 24.92 seconds, 0.0 kB/s

[131028 update]: in fact $ sudo pkill -INFO -n -x dd seems to be a much quicker, and easy to remember, one-liner.

Source: RPi Easy SD Card Setup

List all files in a directory, order by date

Nothing original, the Internet is full of good recommendations, but I had to come up with my own answer:

  1. cd to the upper-level directory
  2. run:  find . -type f -print0 | xargs -0 ls -rtl | awk '{print $6 " " $7 " " $8 " " $9}'

Explanation:

  • find recursively looks for regular files starting from the current directory, output is a long uninterrupted list
  • xargs is used to pass the above output to ls which will display in reverse order, by time, in long format
  • awk will select only the relevant fields