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 Thursday, 27-Mar-2025 04:13:38 JST Julia Evans Julia Evans

    slowly working on a mega terminal cheat sheet

    here's a link to the draft as a PDF: https://jvns.ca/terminal-cheat-sheet-draft.pdf

    In conversation about 3 months ago from social.jvns.ca permalink

    Attachments


    1. https://cdn.masto.host/socialjvnsca/media_attachments/files/114/230/273/792/769/519/original/f5a4f8650092c176.png

    • Embed this notice
      Luke T. Shumaker (lukeshu@fosstodon.org)'s status on Thursday, 27-Mar-2025 04:49:39 JST Luke T. Shumaker Luke T. Shumaker
      in reply to
      • Weasel

      @weaselx86 In Bash you have to enable **/ with `shopt - extglob`.

      @b0rk **/ is useful enough and Bash common enough that IMO it'd be worth adding the above to the sheet.

      In conversation about 3 months ago permalink
    • Embed this notice
      Weasel (weaselx86@mastodon.social)'s status on Thursday, 27-Mar-2025 04:49:40 JST Weasel Weasel
      in reply to
      • Laukidh

      @Laukidh @b0rk

      I tried **/*.txt and got the same result as my usual */*.txt. Using bash, but I've always used */*.txt with previous shells such as sh and csh.

      In conversation about 3 months ago permalink
    • Embed this notice
      Laukidh (laukidh@infosec.exchange)'s status on Thursday, 27-Mar-2025 04:49:41 JST Laukidh Laukidh
      in reply to

      @b0rk **/ is new to me

      In conversation about 3 months ago permalink
    • Embed this notice
      Luke T. Shumaker (lukeshu@fosstodon.org)'s status on Thursday, 27-Mar-2025 05:18:43 JST Luke T. Shumaker Luke T. Shumaker
      in reply to

      @b0rk Because (1) Bash caches PATH lookups by default and sometimes that causes confusing discrepancies with `which`, and (2) `which` isn't always installed, I encourage folks to basically always use `type` instead of `which`.

      In conversation about 3 months ago permalink
    • Embed this notice
      Xenotar (xenotar@mastodon.social)'s status on Thursday, 27-Mar-2025 10:19:00 JST Xenotar Xenotar
      in reply to
      • Aléxia :peitudaMetida: :celeste_hearts_lesbian:

      @b0rk @naoEhAlexa

      Also, I use a lot:

      ! xyz repeats the command number xyz in the history list.

      !pattern repeats the last command in the history list that matches the pattern .

      Example, given this history
      505 dmesg
      506 history
      507 top
      508 tail *OUT
      509 history

      !505 -> repeats dmesg
      !to -> repeats top
      !ta -> repeats tail

      In conversation about 3 months ago permalink
    • Embed this notice
      Weasel (weaselx86@mastodon.social)'s status on Thursday, 27-Mar-2025 11:22:56 JST Weasel Weasel
      in reply to
      • Luke T. Shumaker

      @lukeshu @b0rk

      extglob seems to be on by default on my system (Ubuntu 20.04.6 LTS).

      I still don't understand what the difference is supposed to be between
      */*.txt and **/*.txt

      Here are my "glob" shopt settings:
      dotglob off
      extglob on
      failglob off
      globstar off
      nocaseglob off
      nullglob off

      In conversation about 3 months ago permalink
    • Embed this notice
      Luke T. Shumaker (lukeshu@fosstodon.org)'s status on Thursday, 27-Mar-2025 11:22:56 JST Luke T. Shumaker Luke T. Shumaker
      in reply to
      • Weasel

      @weaselx86 @b0rk

      ** searches down _multiple_ directory levels recursively. So while they'd both find things 1 layer down like foo/bar.txt, **/*.txt will find foo/bar/baz.txt while */*.txt won't.

      In conversation about 3 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.