Buddyverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
weird@sub.wetshaving.social to linuxmemes@lemmy.world · 17 days ago

That is the way

sub.wetshaving.social

message-square
130
link
fedilink
15

That is the way

sub.wetshaving.social

weird@sub.wetshaving.social to linuxmemes@lemmy.world · 17 days ago
message-square
130
link
fedilink
alert-triangle
You must log in or register to comment.
  • Bappity@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    17 days ago
    $ cd ..
    $ ls
    $ cd ..
    $ ls
    

    “hmm yes… everything seems to be in order”

    • LiveLM@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      16 days ago

      I need a shell/plugin/tool/whatever that always shows me the content of the current dir in a little popup or something.

      Anything I do in the shell is like cd this, ls, cd there, ls *, I feel like a have the navigational awareness of a amnesiac goldfish

      • Fushuan [he/him]@lemm.ee
        link
        fedilink
        arrow-up
        1
        ·
        16 days ago

        Put this in bashrc or whatever flavour of shells’s bashrc you use:

        function cs () { cd “$@” && ls }

        I didnt remember the function sintax of bash so I just copied it from SO.

        • Artyom@lemm.ee
          link
          fedilink
          arrow-up
          1
          ·
          16 days ago
          cs () {
              cd $1;
              ls ${@:2}
          }
          

          You (probably) only want to pass the first argument to cd, this’ll send the rest to ls.

          • ka1ikasan@lemmy.zip
            link
            fedilink
            arrow-up
            0
            ·
            16 days ago

            Did that years ago, just called it cds. I also have an “up” command which is an alias to “cds …”. Oh, and I have a “setup server_name” they copy all my aliases to a server and create an alias that allow me to “ssh -A server_name” using only server_name.

      • grrgyle@slrpnk.net
        link
        fedilink
        arrow-up
        0
        ·
        15 days ago

        You probably want rangerfm or vifm. They use miller columns for to show you your surrounding context.

      • Bappity@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        16 days ago

        that, or you have to make ABSOLUTELY SURE that you haven’t accidentally pressed a button on your keyboard that has inevitably resulted in the total destruction of the directory contents

      • Eyedust@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        0
        ·
        16 days ago

        Alternatively, you could use a TUI file manager. Once you get the navigation down you can manage things pretty quickly. Especially with ones that have options for dual directory layouts, like Midnight Commander or vifm.

      • ivanafterall ☑️@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        15 days ago

        A window, you say!?

      • Prime@lemmy.sdf.org
        link
        fedilink
        arrow-up
        0
        ·
        16 days ago

        It is called windows 2000 explorer and it’s great for file operations :) In Linux i have yet to find a really good replacement ;(

        • marx2k@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          16 days ago

          What’s a GUI?

        • Lifter@discuss.tchncs.de
          link
          fedilink
          arrow-up
          0
          ·
          16 days ago

          Try Dolphin. Press F4 to open the terminal view. It stays in dync with the gui so if you use cd in the terminal, the contents of the new folder will be shown.

          • Ziglin (it/they)@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            16 days ago

            That sounds really cool but I spent so much time making things look pretty …

    • grrgyle@slrpnk.net
      link
      fedilink
      arrow-up
      0
      ·
      15 days ago
      cd ..
      pwd
      ls
      ls -a
      tree -d
      git status -bs
      
      cd ..
      ...
      
      • Bappity@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        15 days ago

        I ain’t reading allat

        • grrgyle@slrpnk.net
          link
          fedilink
          arrow-up
          0
          ·
          15 days ago

          Then you invite chaos to sit in your lap, friend

    • peoplebeproblems@midwest.social
      link
      fedilink
      English
      arrow-up
      0
      ·
      16 days ago

      Sometimes I throw off the linux admin reading my log by throwing in a pwd before going to the next one. Know it’s not gonna be in that directory you know?

    • Zachariah@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      16 days ago

      pwd seems more appropriate than ls

      • turtlesareneat@discuss.online
        link
        fedilink
        English
        arrow-up
        0
        ·
        16 days ago

        Doesn’t let you rifle through things approvingly as you go. "Yes this is the correct directory because it has the three files I was looking at earlier–

        You know what let’s do a ls -al just to be super sure it’s the right modification

        • Zachariah@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          16 days ago

          fair point

  • lemmyhavesome@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    16 days ago
    In your rc:
    alias ..='cd ..'
    alias ...='cd ../..'
    alias ....='cd ../../..'
    
    Usage:
    1/2/3 $ ...
    1 $
    
    • /home/pineapplelover@lemm.ee
      link
      fedilink
      arrow-up
      0
      ·
      16 days ago

      That’s pretty neat

    • marx2k@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      16 days ago

      Or just use zsh

      • Matriks404@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        16 days ago

        Yeah, let’s use whole different shell, because you can’t add some few aliases to your .bashrc.

        • marx2k@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          16 days ago

          That’s not why I use a whole different shell. It just happens to be a perk of the one I use.

    • petersr@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      16 days ago

      This is the way.

  • bitchkat@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    15 days ago

    You forgot the pwd after each ‘cd’.

    • Owl@mander.xyz
      link
      fedilink
      arrow-up
      0
      ·
      15 days ago

      ls*

      • bitchkat@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        15 days ago

        Ls doesn’t tell them where they are, just what files exist in their current location.

        • Owl@mander.xyz
          link
          fedilink
          arrow-up
          0
          ·
          15 days ago

          Yup,

          But I want to know if the file I’m looking for is in this directory or I have to cd… once more

          • bitchkat@lemmy.world
            link
            fedilink
            English
            arrow-up
            0
            ·
            15 days ago

            That’s when locate piped to grep is your best friend.

  • over_clox@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    17 days ago

    Honestly I haven’t tried this on Linux yet, but didn’t Windows implement this somewhere along the way?..

    cd ....

    • vortic@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      17 days ago

      I aliased cd to a custom funtion in my bashrc to do this at one point, but cd ../../../.. is too engrained so I never rembered to use it.

      • grimdeter@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        17 days ago

        You will probably like zoxide (i am not sure about policy on links here, but here you go https://github.com/ajeetdsouza/zoxide)

        • cygnus@lemmy.ca
          link
          fedilink
          arrow-up
          0
          ·
          17 days ago

          Zoxide is nice, or use Yazi so you can actually see where you’re going.

    • tehmics@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      17 days ago

      Windows be like

      cd …

      ls

      grumble grumble

      dir

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      0
      ·
      17 days ago

      I believe, zsh supports that.

      • over_clox@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        17 days ago

        Interesting, I might have to check that out someday.

        Though when I write scripts, I’m not a fan of blind folder navigation like that, there’s a good reason for the pushd and popd script commands.

        • Ephera@lemmy.ml
          link
          fedilink
          English
          arrow-up
          0
          ·
          17 days ago

          Oh yeah, I wouldn’t use that for scripts. I wouldn’t use zsh for scripts either.
          I mean, I believe, it’s generally compatible with bash, but just throwing a shebang like #!/bin/sh or #!/bin/bash into the first line of the script will make it execute with sh or bash, even when you run it from zsh.

  • billwashere@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    17 days ago

    Or the alias I have set up

    ……

    • not_woody_shaw@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      17 days ago

      Once you’ve typed … you know if you type more dots it’s to go up more dir, so you don’t really need two dots for each additional dir.

    • AtHeartEngineer@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      16 days ago

      Ya, this is the way. I use ... all the time

    • confusedpuppy@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      I kept saying “cd up” in my mind so I just made an alias for cdu, became a reflex within the next day

  • RamblingPanda@lemmynsfw.com
    link
    fedilink
    arrow-up
    0
    ·
    17 days ago

    I’ve used a script that made ‘up 4’ a thing. Forgot to migrate it though.

    • errer@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      17 days ago

      Biggest issue I have with custom macros is I’m logging into like 5 different machines a day. Don’t wanna keep copying over my custom bash files. Prefer built-in commands.

      • RamblingPanda@lemmynsfw.com
        link
        fedilink
        arrow-up
        0
        ·
        17 days ago

        Yeah, I get that. But I’m traversing my machine a lot while developing, so I want that as hassle free as possible.

    • witty_username@feddit.nl
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      Heyy I have that in my .bashrc
      Works a charm

      • RamblingPanda@lemmynsfw.com
        link
        fedilink
        arrow-up
        0
        ·
        17 days ago

        Had it in my .zshrc. I should look for it, it was helpful

  • Drekaridill@feddit.is
    link
    fedilink
    Íslenska
    arrow-up
    0
    ·
    17 days ago

    cd … ls cd … ls cd … ls cd … ls

  • Zachariah@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    17 days ago

    cd ..
    ⭡ ⏎
    ⭡ ⏎
    ⭡ ⏎

    • maxprime@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      Oh, shit.

    • furry toaster@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      16 days ago

      square

  • oplkill@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    16 days ago

    cd…

  • 7dev7random7@suppo.fi
    link
    fedilink
    arrow-up
    0
    ·
    16 days ago

    bind '"^H":"cd ..^M"'

  • CommanderCloon@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    16 days ago

    Nah, I always cd to full path, that way I can easily use my history to move back there

  • NotProLemmy@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    15 days ago

    alias cdr=‘cd /’

    Heh

  • Dizzy Devil Ducky@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    16 days ago

    I feel called out. Should definitely make an alias or two that auto CDs me the amount of times I need…

  • λλλ@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    16 days ago

    cd ..... I use zsh btw

    • jia_tan@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      16 days ago

      Whaaaaaaaaaaaaaaat

    • Pup Biru@aussie.zone
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      16 days ago

      don’t even need the cd since if it’s a dir, zsh automatically cd to that path ;)

      just ….. works great

  • MoogleMaestro@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    16 days ago
    cd .. && ls
    !!
    !!
    !!
    !!
    
    • grrgyle@slrpnk.net
      link
      fedilink
      arrow-up
      2
      ·
      15 days ago

      What’s so surprising?? What did you see in that dir??

      • NostraDavid@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        15 days ago

        Double-bang repeats the previous command. Great if you forget sudo.

        $ rm -rf <folder>
        permission denied
        $ sudo !!
        
        • grrgyle@slrpnk.net
          link
          fedilink
          arrow-up
          1
          ·
          15 days ago

          Haha yeah I was just being silly

linuxmemes@lemmy.world

linuxmemes@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linuxmemes@lemmy.world

Hint: :q!


Sister communities:
  • !tech_memes@lemmy.world
  • !memes@lemmy.world
  • !lemmyshitpost@lemmy.world
  • !risa@startrek.website

Community rules (click to expand)

1. Follow the site-wide rules
  • Instance-wide TOS: https://legal.lemmy.world/tos/
  • Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like “every user of thing”.
  • Don’t get baited into back-and-forth insults. We are not animals.
  • Leave remarks of “peasantry” to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
4. No recent reposts
  • Everybody uses Arch btw, can’t quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
6. (NEW!) Regarding public figures

We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.

  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.

 

Please report posts and comments that break these rules!


Important: never execute code or follow advice that you don’t understand or can’t verify, especially here. The word of the day is credibility. This is a meme community – even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don’t remove France.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1.52K users / day
  • 4.5K users / week
  • 6.45K users / month
  • 6.58K users / 6 months
  • 1 local subscriber
  • 25.5K subscribers
  • 401 Posts
  • 4.3K Comments
  • Modlog
  • mods:
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org