a useful list techniques to use in Linux

Jamon Camisso jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Tue Jan 31 15:07:25 UTC 2012


On 1/29/2012 12:39 AM, D. Hugh Redelmeier wrote:
> The title is "Some time-saving tips that every Linux user should know" but 
> I think that is an exageration.  Casual users certainly don't need to know 
> all of this.
> 
> <http://linux-news.org/index.php/2012/01/22/some-time-saving-tips-that-every-linux-user-should-know/>

Biggest thing for me was learning non-greedy regular expressions using
negated characters for use with egrep and sed. I don't use grep at all
now, and rarely use a .* or .+.

Next up, here documents were a revelation for me. Sometimes the need
arises, and being able to ssh foo <<EOF and then run a few commands in a
bash script say is remarkably handy sometimes.

Last, I was quite pleased to learn that dd responds to SIGUSR1 and will
display its status if you ask it nicely. Start a dd in a new terminal or
screen session:

[9:51:31|12-01-31]jamon at jamon:pts/5: /home/jamon
 0 % dd if=/dev/zero of=/dev/null

Then send it SIGUSR1:
pkill -SIGUSR1 dd

You'll see something like this:
7029904+0 records in
7029904+0 records out
3599310848 bytes (3.6 GB) copied, 2.23009 s, 1.6 GB/s

Quite handy for large dd operations. Combine with watch (or watch -d on
the target dd output file if applicable?) and you've got a decent way to
monitor progress.

Jamon
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list