GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Julia Evans (b0rk@social.jvns.ca)'s status on Saturday, 14-Dec-2024 06:29:16 JST Julia Evans Julia Evans

    writing about the terminal is so funny because it's like "redirects are so useful! hooray!"

    "okay and also `cmd file.txt > file.txt` will just permanently delete the contents of the `file.txt`”

    lots of cool useful tools with the occasionally horrifying fact that you just need to keep seared into your memory

    (please do not explain to me why this happens)

    In conversation about 5 months ago from social.jvns.ca permalink
    • Rich Felker repeated this.
    • Embed this notice
      Cassandra Granade 🏳️‍⚧️ (xgranade@wandering.shop)'s status on Saturday, 14-Dec-2024 06:29:15 JST Cassandra Granade 🏳️‍⚧️ Cassandra Granade 🏳️‍⚧️
      in reply to

      @b0rk This is part of why I'll often write out a potentially scary command starting with a comment character, then go back and erase it when I'm confident.

      In conversation about 5 months ago permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Monday, 16-Dec-2024 11:24:50 JST Rich Felker Rich Felker
      in reply to

      @b0rk I just use backup, but noclobber for interactive shells sounds interesting. I usually use it only in scripts that first checked for existence (purely to handle the race condition).

      In conversation about 5 months ago permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Monday, 16-Dec-2024 11:25:37 JST Rich Felker Rich Felker
      in reply to
      • Kevin Hughes 🐝
      • Cassandra Granade 🏳️‍⚧️

      @kev @xgranade @b0rk Just let folks be warned: this doesn't defang the >

      In conversation about 5 months ago permalink
    • Embed this notice
      Kevin Hughes 🐝 (kev@mcr.wtf)'s status on Monday, 16-Dec-2024 11:25:39 JST Kevin Hughes 🐝 Kevin Hughes 🐝
      in reply to
      • Cassandra Granade 🏳️‍⚧️

      @xgranade @b0rk I do a similar thing where I use echo instead of any command with a glob which will harmlessly list the files I'm about to do something to. Especially with rm or something!

      In conversation about 5 months ago permalink
    • Embed this notice
      Rich Felker (dalias@hachyderm.io)'s status on Monday, 16-Dec-2024 11:30:46 JST Rich Felker Rich Felker
      in reply to
      • Ben Cox
      • Mark Dominus

      @ben @mjd @b0rk It's standard POSIX, not a bashism, and it's set -c. set -o noclobber is the verbose bash-specific form.

      In conversation about 5 months ago permalink
    • Embed this notice
      Ben Cox (ben@pgh.social)'s status on Monday, 16-Dec-2024 11:30:48 JST Ben Cox Ben Cox
      in reply to
      • Mark Dominus

      @mjd @b0rk Looks like bash does have it, with `set -o noclobbber`

      In conversation about 5 months ago permalink
    • Embed this notice
      Mark Dominus (mjd@mathstodon.xyz)'s status on Monday, 16-Dec-2024 11:30:49 JST Mark Dominus Mark Dominus
      in reply to

      @b0rk As to that I have no clue.

      Hey, do you know about the `-o` option of `sort`? I guess it's about 90% likely that you do but if not I think you will find it tasty. I use it frequently.

      In conversation about 5 months ago permalink
    • Embed this notice
      Julia Evans (b0rk@social.jvns.ca)'s status on Monday, 16-Dec-2024 11:30:50 JST Julia Evans Julia Evans
      in reply to
      • Mark Dominus

      @mjd i've heard of it (maybe bash has it too?) but it's not clear to me if people actually use it in practice

      In conversation about 5 months ago permalink
    • Embed this notice
      Mark Dominus (mjd@mathstodon.xyz)'s status on Monday, 16-Dec-2024 11:30:52 JST Mark Dominus Mark Dominus
      in reply to

      @b0rk Have you seen `csh`'s "noclobber" feature? If you had `noclobber` set, then `cmd > file` would fail without erasing `file`, if it already existed. You would have to explicitly demand its clobbering with `cmd >! file`.

      In conversation about 5 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.