this post was submitted on 25 May 2025
894 points (100.0% liked)

linuxmemes

25097 readers
3105 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

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 figuresWe 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.

    founded 2 years ago
    MODERATORS
    top 50 comments
    sorted by: hot top controversial new old
    [–] [email protected] 6 points 2 hours ago
    alias ..='cd ..' #: up one directory
    alias ...='cd ../..' #: up two directories
    
    [–] [email protected] 1 points 1 hour ago* (last edited 1 hour ago)

    The good thing about Dolphin is you can have the real tree following your navigation. Want to go up a few levels, just click once, directly where you want to go next. None of this up, up, up nonsense. Great for snooping in many different folders in quick succession.

    [–] [email protected] 12 points 4 hours ago (1 children)

    You forgot the pwd after each 'cd'.

    [–] [email protected] 2 points 2 hours ago (1 children)
    [–] [email protected] 1 points 2 hours ago (1 children)

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

    [–] [email protected] 2 points 2 hours ago (1 children)

    Yup,

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

    [–] [email protected] 2 points 1 hour ago

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

    [–] [email protected] 4 points 9 hours ago (1 children)

    Easiest solution, use fish instead of bash! Default fish keybindings will allow you to just type . . or name a directory similar to how you could do with Zoxide.

    Also, wait until you find about pushd and popd ;)

    [–] [email protected] 1 points 1 hour ago* (last edited 1 hour ago)

    Really buried the lede there: pushd and popd are what I use instead of cd most times!

    [–] [email protected] 2 points 13 hours ago* (last edited 13 hours ago)

    alias cdr='cd /'

    Heh

    [–] [email protected] 7 points 21 hours ago (1 children)
    [–] [email protected] 1 points 2 hours ago

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

    [–] [email protected] 28 points 1 day ago* (last edited 1 day ago) (1 children)
    alias cd..='cd ..'
    alias cd...='cd ../..'
    alias cd....='cd ../../..
    alias cd.....='cd ../../../..'
    [–] [email protected] 5 points 7 hours ago

    Then forget all that and just use

    cd ~ or cd /

    [–] [email protected] 3 points 18 hours ago

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

    [–] [email protected] 5 points 21 hours ago
    [–] [email protected] 193 points 1 day ago* (last edited 1 day ago) (6 children)
    $ cd ..
    $ ls
    $ cd ..
    $ ls
    

    "hmm yes.. everything seems to be in order"

    [–] [email protected] 3 points 2 hours ago (1 children)
    cd ..
    pwd
    ls
    ls -a
    tree -d
    git status -bs
    
    cd ..
    ...
    
    [–] [email protected] 1 points 1 hour ago (1 children)
    [–] [email protected] 2 points 1 hour ago

    Then you invite chaos to sit in your lap, friend

    [–] [email protected] 40 points 1 day ago* (last edited 1 day ago) (9 children)

    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

    [–] [email protected] 2 points 2 hours ago

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

    [–] [email protected] 3 points 3 hours ago

    A window, you say!?

    [–] [email protected] 19 points 1 day ago (1 children)

    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.

    [–] [email protected] 17 points 1 day ago (1 children)
    cs () {
        cd $1;
        ls ${@:2}
    }
    

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

    load more comments (1 replies)
    [–] [email protected] 10 points 1 day 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.

    load more comments (5 replies)
    load more comments (4 replies)
    [–] [email protected] 3 points 21 hours ago

    Childhood me with only MS-DOS machines is all feeling nostalgic.

    [–] [email protected] 16 points 1 day ago (2 children)

    i use fish shell with https://github.com/nickeb96/puffer-fish

    basically when i type ... it expands to ../.. and adds another /.. for every additional dot i type

    its similar to what the zsh users in the comment section are doing

    [–] [email protected] 2 points 17 hours ago* (last edited 17 hours ago) (1 children)

    I was about to post something similar. With fish you can do your own functions, right? So, you can pass any dots as arguments to a function called cd, so, for every extra dot after .., you append a /.. at the end.

    [–] [email protected] 1 points 7 hours ago* (last edited 7 hours ago)

    yeah, but its less visual

    cd ..... is harder to understand than cd ../../../..

    also the extension work with any commend, not just cd

    load more comments (1 replies)
    [–] [email protected] 11 points 1 day ago
    cd ..
    !!
    !!
    !!
    
    [–] [email protected] 43 points 1 day ago* (last edited 1 day ago) (1 children)
    [–] [email protected] 34 points 1 day ago (1 children)

    Excuse me what? I've been multi cd'ing for years like a chump?

    [–] [email protected] 10 points 1 day ago (1 children)

    Exactly. The fucking what now?

    [–] [email protected] 1 points 1 hour ago

    Doesn't work on my machine... is it a setting that needs to be enabled or something?

    [–] [email protected] 52 points 1 day ago* (last edited 1 day ago) (3 children)
    In your rc:
    alias ..='cd ..'
    alias ...='cd ../..'
    alias ....='cd ../../..'
    
    Usage:
    1/2/3 $ ...
    1 $
    
    [–] [email protected] 4 points 1 day ago (2 children)
    load more comments (2 replies)
    load more comments (2 replies)
    [–] [email protected] 24 points 1 day ago

    for i in { 1..4 }; do cd ..; done

    [–] [email protected] 2 points 21 hours ago

    More like cd… dir cd… dir cd…

    [–] [email protected] 8 points 1 day ago
    [–] [email protected] 16 points 1 day ago

    I use a lot cd - (go to previous) or just cd to go home.

    [–] [email protected] 57 points 1 day ago* (last edited 1 day ago) (2 children)

    cd ..
    ⭑ ⏎
    ⭑ ⏎
    ⭑ ⏎

    load more comments (2 replies)
    [–] [email protected] 3 points 1 day ago

    cd /some/thing/i/remember

    [–] [email protected] 23 points 1 day ago (9 children)
    load more comments (9 replies)
    load more comments
    view more: next β€Ί