GNU World Order is an internet audio show about GNU, Linux, UNIX, and other technical and geeky topics. We release in the free Ogg Vorbis and Opus audio formats. Please leave your ad blockers on.

Listen: Ogg 12x8 | Opus 12x8

2018-02-19T12:09:32Z

We hope you find this episode useful.

Here are Ken Fallon's shownotes:

A good alternative to ls:

find -ls

Find this, and then do that:

find -type f -iname "*txt" -exec grep cows {} \;

Identify symlinks when I need to redirect stuff from one data store to another:

find -type l

Useful for listing just directories, and getting around the annoying habit of ls *, which returns the files in sub dirs.

find -maxdepth 1 -type d

The prune option can exclude results:

find . -iname "*.wav" -type f -o -prune "./foo"

Identify empty files:

$ find -empty
foo

$ find -empty | xargs --max-args 1 trashy

As a cron job to remove old log files

0 23 * * * find /var/log -iname "~*" -o -iname "*log*" -mtime +30 -exec
trashy {} \; > /tmp/removing-old-logs.txt 2>&1

The mtime option allows you to limit a search to files older than, but also files newer than, some value * 24. It's great for when you bring up a new service that's logging something but you don't know where.

For bash scripts, I use this format a lot:

for foo in $( find /var/tmp/ -type f -name "foo.bar");do echo $foo;done

or like this

find /var/tmp/ -type f -name "foo.bar" | while read foo;do echo $foo;done

It's amazing how often I run this

find -type f -iname "*.something" -exec ls --full-time {} \;

or this

find -type f -iname "*.something" -exec grep something {} \;

Usually I throw in the -maxdepth option to limit the search depth.

Use the ipath or iwholepath to scrub a path for a string.

find -ipath "*something*"

Then there's this type of construct for tools like ffmpeg and xmlstarlet that don't love wildcards from for loops.

find -type f -iname "*.xml"| while read i;do xmlstarlet sel -T -t -m
'rss/channel/item/enclosure' -v '@url' -n "${i}";done

Then there's the awkward way it handles multiple options:

find \( -ipath "*foo*" -o -ipath "*bar*" \) -exec rm -v {} \;

Note: locate and updatedb use find in the background.

ogg 214eb2263e77756db83e8de06707140d69f59f8509969cd1496e62c4a9f0b565
opus 926aa00e84291ee63cec104d63c4b50aeda9ddd0051dd8390b736c172ca41cc2
m4a d32bf729beecb964cb8503b99a405256f3ecf446fd7f3f4debe0f4610a8339ed
spx 3455e9da8dc9ab89ed7250a03e0a05597e7b615b94262fe6f916f87d6165994e
Links:
GNU findutils
GNU findutils user manual

Listen: Ogg 12x7 | Opus 12x7

2018-02-14T14:30:00Z

Klaatu, whilst stranded in a hotel somewhere in middle America after a delayed flight, reviews his new InkBook Classic 2 ebook reader, which has replaced his broken Kobo n905.

ogg 91c0d0d74e6b8627d39bf08d5a413afca3027ee5e0cd4376a69197769eae9f91
opus c9a76591f76c4c1bcec2b3ab27bb9200f91a10a3d8594dc8ec291cdbe503b02d
m4a bfa632431d079143a1e3cd174ec26c5e26db7cbf8736b05aa775d80f15c0d6a0
spx 9761c843563583d580ae1efaf4c3d00aa5596eaa03c34738a57f92102fc09912
Links:
Android open source

Listen: Ogg 12x6 | Opus 12x6

2018-02-08T04:44:37Z

Klaatu expounds upon xargs and talks GNU parallel. Also, a bit about the concept of runtimes.

Here is a recent real-world benchmark comparing parallel to xargs:

$ time find . -type f -name "*.wav" | xargs -I% --max-args 1 sox % %.flac

real    1m5.364s                                                                        
user    1m3.907s                                                                      
sys     0m1.424s

$ time find . -type f -name "*.wav" | parallel -I% --max-args 1 sox % %.flac

real    0m22.743s
user    1m21.780s
sys     0m1.400s

ogg 83bde56b08fb15cf7e554491b4e9df6e46efc04102e3afb5555852d6349679ff
opus f8c46c403f504773c8e7a64f5e2704bcaa3a554f1d3edf721513df5ae39ee52a
m4a 9619b9e2127e1b65e278689d0c7ed36ca7ef075cd6b8e1d5f30de765b507f88a
spx e15a070c75ff9ac30de5fd1c0d5a62aa3f29c3d599146739568c65bbe31a3671
Links:
GNU Parallel
Dark oCCult build script using GNU parallel

Listen: Ogg 12x5 | Opus 12x5

2018-01-27T20:06:25Z

All about the GNU xargs command.

ogg 2befbf2c6eb24428db2acbe7b007020e4bdafd4b7f1b98578f16a67f52d72474
opus 5580e2b1117144b058211b6ce80530cb75b7bc4d49745a0aa4e969fdd677cfd2
m4a d07d8e3df085cd0707cb50bcad7a0a2e84d54d96926ba4bf4c69366441cbcc45
spx d81696b9a1a30445ff4c202890528fe225fc146c0395a85ee9765111b0a16bdb
Links:
GNU findutils

Listen: Ogg 12x4 | Opus 12x4

2018-01-23T22:06:18Z

A bonus episode this week. Klaatu talks about getty, agetty, inittab, gawk, and more.

ogg 17356498562df4a04957c1dc6f02107f26152eace77c870246cf2b5efdace891
opus b7368c425abbe8197f4f26df4659392e16270754f9256d6fbeef7d4f5eb21853
m4a c1bdb98b86ede5b44ac2d012a8f6fe1833da6124b7af7cd79bff80637b5734bb
spx 8e6cda517a81167279020fb2270c6821c692ca91a9b74646a69e41eacd141789
Links:
History of BeOS
Haiku is an open source BeOS

Listen: Ogg 12x3 | Opus 12x3

2018-01-23T04:33:47Z

Klaatu talks about BeOS, Haiku, elvis, e2label, mlabel, and much more. Either next week or the week after, let's do an episode on find. Send Klaatu your cool find hacks!

ogg 6d85516bd7276a97e49d00b127e4d292181943dc498a6575c7ff99b17a887360
opus aedd88aebfabec05f929bc2dde170b69f608cbff1ecb2c895555514a19d92583
m4a 6aa537ac0950bf48556396cc95d1823bd55e2803e3e11225845d0de9437dc14f
spx 5ccae4b3c0261c621829b0be49422d5971d9af2b4c6457ab67c31d611196630a
Links:
History of BeOS
Haiku is an open source BeOS

Listen:o Ogg 12x2 | Opus 12x2

2018-01-15T01:56:19Z

Klaatu introduces his podwrite tool, his custom toolkit for publishing this show and his Chronicles & Commons show.

ogg 062f6eda50a5c9d3177bc7725ca5fd21d9b6043e0a2dd6eac43cf03837d6a5d3
opus 2ca99f7280a7cfeb785009cd37947adaa098161c727fd3534b2401d8b9598c75
m4a d8b7c8bb8e8ab9a1a6fda60d049473fb1cf493498da9a51b362a812b53f1d620
spx e73db40f6992fe9e64cf175c0f9b734804ce01e499c2633428c927c5aa1f153a
Links:
Podwrite on Gitlab
Podwrite documentation
The excellent Wordpress plugin, Podpress, is easier but harder to automate

Listen: Ogg 12x1 | Opus 12x1

2018-01-08T15:38:02Z

Klaatu continues his tour of the low level Linux filesystem, covering exciting commands like attr, the GNU coreutils, infocmp, and more.

shasum -a256:
ogg dd7e999b1e9eebf835ab0a18a7f70850422fbf610cf033d640bd219c5ad77491
opus fedc55bd11e6c780710d36dadcc3dae2bd40af3d0633c5690d2efa44157fe3e6
m4a d55b2da937801664fc2258cb1e38a965446587092df895b5485703200af55e25
Links:
Linux from Scratch

Listen: Ogg 12x0 | Opus 12x0

2018-01-01T18:02:05Z

Linux user, know thyself. It's a new year and a new season, and the GNU World Order is now officially an Ogg Vorbis and Opus cast. Although there is no speex feed now, there is no need to update your feed. The old speex feeds are symlinked to the new Opus feed.

In this episode, Klaatu takes a look at all those little files that get installed when you install Linux, like libgmp, libglib, libgobject, libpanel, libusb, and many many more.

shasum -a256:
ogg 5468697f0d58ba413a5038196b41efb8a319e5e66f726ab62468993f67b1ac17
opus 38a71ad2fe11728cdf83d00aff69f3a52904cd1b9b0b5a1a191f776e15b3bf8d
Links:
Slackware package set a