658
you are viewing a single comment's thread
view the rest of the comments
[-] rc__buggy@sh.itjust.works 22 points 1 year ago* (last edited 1 year ago)

tee isn't exactly the opposite of cat but I can't remember a command that only redirects screen output to a file.

What is up, tee?

edit: what's the opposite of "cd .."?

[-] SpaceNoodle@lemmy.world 5 points 1 year ago

cat is for concatenating files, so the opposite would be something that breaks a stream up into multiple files.

[-] joranvar@feddit.nl 8 points 1 year ago* (last edited 1 year ago)

So, split.

Edit: although there's also tac, which could fit the bill as well.

[-] rc__buggy@sh.itjust.works 3 points 1 year ago
[-] joranvar@feddit.nl 3 points 1 year ago

I mean... it's nice that it exists and all, but I can't really think of many useful usecases.

[-] rc__buggy@sh.itjust.works 2 points 1 year ago

I think I only ever used it in an intro to shell scripting where we (almost) recreated the function of tail

[-] joranvar@feddit.nl 2 points 1 year ago

Something like tac | head | tac, I guess? Yes, that's a valid use case indeed :)

[-] SpaceNoodle@lemmy.world 3 points 1 year ago
[-] joranvar@feddit.nl 2 points 1 year ago

Heh, no, but they do have a nice set of man pages and other documentation online. I prefer NixOS. Easier keeping track of configuration, easier rolling back of (and experimentation with) new stuff.

[-] tetris11@lemmy.ml 1 points 1 year ago

tac is a real command and does exactly what you think it is

How about tac which prints lines but last to first.

[-] jaybone@lemmy.world 3 points 1 year ago

It prints to stdout. I’d say the opposite is read, which reads from stdin.

[-] Trigger2_2000@sh.itjust.works 2 points 1 year ago
[-] jaybone@lemmy.world 2 points 1 year ago

There’s pushd where the opposite is clearly popd.

[-] Karyoplasma@discuss.tchncs.de 2 points 1 year ago

Hmm, maybe pwd?

this post was submitted on 31 Aug 2024
658 points (96.2% liked)

Microblog Memes

9849 readers
630 users here now

A place to share screenshots of Microblog posts, whether from Mastodon, tumblr, ~~Twitter~~ X, KBin, Threads or elsewhere.

Created as an evolution of White People Twitter and other tweet-capture subreddits.

Rules:

  1. Please put at least one word relevant to the post in the post title.
  2. Be nice.
  3. No advertising, brand promotion or guerilla marketing.
  4. Posters are encouraged to link to the toot or tweet etc in the description of posts.

Related communities:

founded 2 years ago
MODERATORS