[HN Gopher] Command Line One-Liners
___________________________________________________________________
Command Line One-Liners
Author : aphrax
Score : 170 points
Date : 2023-03-20 08:52 UTC (14 hours ago)
(HTM) web link (www.commandlinefu.com)
(TXT) w3m dump (www.commandlinefu.com)
| godshatter wrote:
| For the simple tar command, I've read somewhere that it's best to
| not encode the output using the tar command itself (i.e. tar -cvf
| blah; zip blah instead of tar -cvzf blah), but I'm not sure what
| the reasoning is. Has anyone else heard this? Something to do
| with passing files between systems that may not the right
| encoding software maybe?
| lgeorget wrote:
| I think it would only makes sense if the target system on which
| the script may run has `zip` but not a version of `tar`
| supporting the `-z` option. That's certainly unlikely to ever
| happen.
|
| There's also `tar -cvf - | zip blah.zip -` with the idea that
| it's a poor man's way to parallelize the `tar` and `zip`
| processes but I don't think it makes a real difference in
| recent implementations of `tar`. At least in a couple of tests
| I've just run, it's just as fast.
| aka878 wrote:
| This is amazing, "Watch Star Wars via telnet":
| https://www.commandlinefu.com/commands/view/1713/watch-star-...
| shortrounddev wrote:
| Only bash?
| scbrg wrote:
| No, most of them work fine in vanilla sh too :-)
| recursive wrote:
| Found some powershell too, but curiously, they seem to be all
| mixed together.
| asicsp wrote:
| Sorted by votes:
| https://www.commandlinefu.com/commands/browse/sort-by-votes
|
| Filter option is nice too, here's top `awk` commands:
| https://www.commandlinefu.com/commands/matching/awk/YXdr/sor...
| (expected removing duplicates to be #1 instead of #3)
|
| There are comments too, but some are filled with spam.
|
| See also:
|
| * http://www.compciv.org/unix-tools/
|
| * https://github.com/jlevy/the-art-of-command-line
|
| * https://github.com/learnbyexample/scripting_course#ebooks (my
| books on grep/sed/awk/perl/ruby/coreutils/etc - free to read
| online)
| politelemon wrote:
| In case anyone misses it, click the titles and you'll see
| alternatives.
|
| For example the second most popular one is to serve a directory
| and the alternatives show the Python3 way of doing it.
|
| https://www.commandlinefu.com/commands/view/71/serve-current...
| pfoof wrote:
| Very cool but I have never seen so large spambot density per
| square 1em as in the comment sections
| technick wrote:
| Completely agree, the spam is a turn off for the site. I assume
| if someone is smart enough to build a site like this, they know
| how to eliminate the spam but are just lazy.
| BtM909 wrote:
| 1. What's up with that? Looks like testing bots, because most
| of the messages don't make sense at all.
|
| 2. They should mitigate these bots, because ultimately it will
| make the website annoying to visit.
| status200 wrote:
| Looks like oldschool SEO farming by stuffing a bunch of
| reference links to their site all over the internet so the
| robots think that tons of people are linking to your site.
| Don't think it works as well anymore but still a common
| tactic.
| cp1 wrote:
| I don't think they're testing bots; many seem to be linking
| to external sites or advertising something.
| probotect0r wrote:
| Maybe SRE related spam?
| greyman wrote:
| Nice work, but I wonder if websites like this will not become
| obsolete soon. In most cases I can get the same result with
| ChatGPT, where I can also ask followup questions.
| s_dev wrote:
| Where do you think ChatGPT gets the data to try on to produce
| results from a query? I suspect websites like this are part and
| parcel of the training data it scours the open web for.
| greyman wrote:
| You are right. I only wanted to say, that in the pre-GPT era,
| such websites were more useful for the programmers as they
| are now.
| reyqn wrote:
| This also has the advantage of being browseable. I just
| sorted by votes and learnt some neat new tricks.
| creeble wrote:
| Thus the future of AI eating its own tail - when we give up
| on maintaining the sites that feed the AI because the AI is
| so good at replacing them.
|
| Then AI stops learning.
| mikece wrote:
| I can't stop laughing at the name of the website: I personally
| would have ended it with "foo" rather that something that can be
| pronounced "f you" but I'm bookmarking this one for regular
| reference!
| [deleted]
| cfiggers wrote:
| The word "Fu" (pronounced "foo") is a reference to "Kung Fu," a
| Chinese martial art. It is used colloquially in combination
| with other words to mean "something someone has to practice to
| become a skilled expert in." You might see "Google-fu," as in,
| "skill using search engines to find what you're looking for,"
| or "Spreadsheet-fu," as in, "skill using Microsoft Excel or
| other spreadsheet programs," or similar things.
|
| In this case, "Command Line Fu" is meant to suggest that the
| command line is something you can practice to improve your
| skills with, analogous to a martial art. It's not meant to be
| pronounced "F you"--though I'm sure you're allowed to continue
| doing that if you find it amusing!
___________________________________________________________________
(page generated 2023-03-20 23:01 UTC)