I am just curious about what Ubuntu is doing behind the scenes after I type a command in the terminal and it takes a long time to complete the requested action. In my case here now, I typed the command to completely clean an 8GB pendrive and it took more than half an hour to do it. I want to completely clean a second pendrive, and I’d just like to see what Ubuntu is doing. The particular command is imaterial, as I've had this happen several times already with other commands, particularly those for formatting disks; but here is the command I’m about to use:

sudo dd if=/dev/zero of=/dev/sdX

where ‘X’ could be any relevant letter.

As I see it, I might open one more terminal and type a command to tell me verbosely and in real time what Ubuntu is doing in order to clean the pendrive (or perform any other requested action).

  • If you could somehow monitor all stuff Ubuntu does behind the scenes (system calls, IO actions, etc), that would probably return more lines than your terminal can print at once, but for sure more than you can read through anyway. – Byte Commander May 23 '16 at 19:18
  • I was thinking of something more visual-like, such as the table of clusters shown in Windows while defragmenting. – Pabzum May 23 '16 at 19:21
  • That would be a pretty limited view of what's happening... But I have no idea how to even get such filtered information. – Byte Commander May 23 '16 at 19:25
  • As a side note: to speed up dd considerably, you can specify the block size using the bs option. For example: sudo dd if=/dev/zero of=/dev/sdX bs=4M (copying in 4MB increments) will go a lot faster than copying byte-by-byte. – Nick Weinberg May 23 '16 at 21:19
  • Thank you, Nick! I was initially unsure whether to use that option. I’ll do it now. – Pabzum May 24 '16 at 19:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.