One note: I believe `shred` won't work as expected on a journaling file system like ext4.
Linux utils that you might not know
21–30 of 159 posts
Re: Linux utils that you might not know
#22Gotten a lot of mileage out of the various seldom used options of uniq, diff and cut too.
Re: Linux utils that you might not know
#23Re: Linux utils that you might not know
#24Why does one use `font-weight: 200` for code?
Re: Linux utils that you might not know
#25It always pains me when I see people use "cat" left and right, even when they don't need it. This makes for good reading: http://porkmail.org/era/unix/award.html
Re: Linux utils that you might not know
#26It always pains me when I see people use "cat" left and right, even when they don't need it. This makes for good reading: http://porkmail.org/era/unix/award.html
Many people chain ps and grep... pgrep does that
At least with "in appropriate use of cat" (as some call it) you're literally just swapping the stdin file stream with a disk io file stream so there's no functional difference what-so-ever.
I'm not saying I agree with the GP either though as most of the time complaints about "in appropriate use of cat" are just showboating. Using `cat` "inappropriately" is arguably more readable for less seasoned shell script developer and it's certainly a more logical program flow for a human to parse. ie "open file, grep for contents, do something else, etc". But it's still sometimes worth a reminder that many string processing tools can accept file input directly without the need for piping it via stdin (or the files can be redirected directly from the shell via the less than, `<`, token).
Re: Linux utils that you might not know
#27Earlier quoted context omitted.
and on the contrary: aside from the title, is anything in this article specific to Linux?
Actually not, since these GNU tools could be used on BSD as well.
Re: Linux utils that you might not know
#28One note: I believe `shred` won't work as expected on a journaling file system like ext4.
1) write to journal "I'm going to overwrite this file with this data (zeros)"
2) commit journal
3) write data to file
This is typical for journaling filesystems-- step 3 can be interrupted by a crash and replayed later (by re-reading the journal).For filesystems with CoW data (ZFS, btrfs), the in-place data will probably not be overwritten.
Re: Linux utils that you might not know
#29factor 100000000000000000000000000000000000000
100000000000000000000000000000000000000: 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
http://www.wolframalpha.com/input/?i=factor+1000000000000000...
also numfmt bug:
$ numfmt --to=iec 999999999999999999939999999 828Y
$ numfmt --to=iec 999999999999999999940000000 numfmt: value too large to be printed: '1e+27' (cannot handle values > 999Y)
but 999999999999999999939999999 is ~1000YB : http://www.wolframalpha.com/input/?dataset=&i=99999999999999...
Re: Linux utils that you might not know
#30One note: I believe `shred` won't work as expected on a journaling file system like ext4.