Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How can I see the progress of e2fsck in the terminal? Are there any pv like ways?

For example how can I see how far along this command is in progress:

e2fsck -f -y -v /dev/sdb1
share|improve this question
1  
From the man page it looks like -C offers some kind of progress indicator. Does that not work for you? – Faheem Mitha Jun 17 '11 at 7:49

1 Answer

up vote 3 down vote accepted

From man e2fsck:

-C fd
This option causes e2fsck to write completion information to the specified file descriptor so that the progress of the filesystem check can be monitored. This option is typically used by programs which are running e2fsck. If the file descriptor number is negative, then absolute value of the file descriptor will be used, and the progress information will be suppressed initially. It can later be enabled by sending the e2fsck process a SIGUSR1 signal. If the file descriptor specified is 0, e2fsck will print a completion bar as it goes about its business. This requires that e2fsck is running on a video console or terminal.

Note particularly the line I bolded and try e2fsck -C 0. Apparently you can even enable the progress bar output after you run the program by sending the process the right signal!

pkill -SIGUSR1 e2fsck
share|improve this answer
Note: Edited to include information on getting progress on an already started app. It's amazing what you can learn by actually reading man pages! – Caleb Jun 17 '11 at 15:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.