From d54f4f0fa4e8b151d7eed9cd291e06db8483fec6 Mon Sep 17 00:00:00 2001 From: Adam McDaniel Date: Tue, 16 Jun 2015 15:16:00 -0600 Subject: [PATCH] Add 'grep . *' oneliner trick for high-level scan of a directory --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index d247fe5..e97ed0c 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,12 @@ A few examples of piecing together commands: cat a b b | sort | uniq -u > c # c is set difference a - b ``` +- Use `grep . *` to visually examine all contents of all files in a directory. Useful for directories filled with config settings, like /sys /proc /etc. +```sh + cd /proc/sys/net/ipv4 + grep . * +``` + - Summing all numbers in the third column of a text file (this is probably 3X faster and 3X less code than equivalent Python): ```sh awk '{ x += $3 } END { print x }' myfile