650
That is the way (sub.wetshaving.social)
top 50 comments
sorted by: hot top controversial new old
[-] bappity@lemmy.world 186 points 2 weeks ago* (last edited 2 weeks ago)
$ cd ..
$ ls
$ cd ..
$ ls

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

[-] LiveLM@lemmy.zip 42 points 2 weeks ago* (last edited 2 weeks 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@lemm.ee 21 points 2 weeks 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 19 points 2 weeks 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 5 points 2 weeks 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.

[-] Eyedust@lemmy.dbzer0.com 9 points 2 weeks 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.

[-] Prime@lemmy.sdf.org 6 points 2 weeks 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 ;(

[-] Lifter@discuss.tchncs.de 13 points 2 weeks 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.

load more comments (1 replies)
load more comments (1 replies)
load more comments (2 replies)
[-] Zachariah@lemmy.world 4 points 2 weeks ago

pwd seems more appropriate than ls

[-] turtlesareneat@discuss.online 12 points 2 weeks 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

load more comments (1 replies)
load more comments (1 replies)
[-] lemmyhavesome@lemmy.world 52 points 2 weeks ago* (last edited 2 weeks ago)
In your rc:
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'

Usage:
1/2/3 $ ...
1 $
[-] pineapplelover@lemm.ee 12 points 2 weeks ago

That's pretty neat

load more comments (4 replies)
[-] wpb@lemmy.world 44 points 2 weeks ago* (last edited 2 weeks ago)
[-] karmiclychee@sh.itjust.works 35 points 2 weeks ago

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

[-] beeng@discuss.tchncs.de 10 points 2 weeks ago

Exactly. The fucking what now?

[-] Matriks404@lemmy.world 29 points 2 weeks ago* (last edited 2 weeks ago)
alias cd..='cd ..'
alias cd...='cd ../..'
alias cd....='cd ../../..
alias cd.....='cd ../../../..'
[-] AA5B@lemmy.world 5 points 2 weeks ago

Then forget all that and just use

cd ~ or cd /

load more comments (1 replies)
[-] Zachariah@lemmy.world 26 points 2 weeks ago* (last edited 2 weeks ago)

cd ..
⭡ ⏎
⭡ ⏎
⭡ ⏎

[-] maxprime@lemmy.ml 6 points 2 weeks ago
[-] Naich@lemmings.world 23 points 2 weeks ago

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

[-] zqwzzle@lemmy.ca 22 points 2 weeks ago
[-] Maxxie@lemmy.blahaj.zone 9 points 2 weeks ago

Installing zoxide led me to installing fzf, which has improved my terminal experience by about 35%, I already installed it in all the machines I'm managing

Got any more tools? :)

[-] Eyedust@lemmy.dbzer0.com 5 points 2 weeks ago* (last edited 2 weeks ago)

Check out Atuin. Its another must have for me. When you push up arrow, it shows your command history in a very pleasing list. You can even generate account keys to migrate your history between PCs, but I've never bothered with it. You can also search past commands on the history menu.

You don't need an account for it. That's only for the migration keys.

load more comments (3 replies)
load more comments (2 replies)
[-] beerclue@lemmy.world 16 points 2 weeks ago

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

[-] quantenzitrone@lemmings.world 16 points 2 weeks ago

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

load more comments (3 replies)
[-] bitchkat@lemmy.world 13 points 2 weeks ago

You forgot the pwd after each 'cd'.

load more comments (4 replies)
[-] lambda@programming.dev 12 points 2 weeks ago
[-] jia_tan@lemmy.blahaj.zone 4 points 2 weeks ago

Whaaaaaaaaaaaaaaat

load more comments (2 replies)
[-] OpenStars@discuss.online 11 points 2 weeks ago

Depending on where you are, maybe just "cd".

[-] wreckedcarzz@lemmy.world 8 points 2 weeks ago

Smh when are you going to upgrade to dvd

[-] axEl7fB5@lemmy.cafe 11 points 2 weeks ago
cd ..
!!
!!
!!
[-] _thebrain_@sh.itjust.works 9 points 2 weeks ago* (last edited 2 weeks ago)
load more comments (2 replies)
[-] hperrin@lemmy.ca 9 points 2 weeks ago
load more comments (1 replies)
[-] Fizz@lemmy.nz 9 points 2 weeks ago

Me doing it the worst way > opening up dolphin(file explorer) navigating to the folder then opening terminal there.

[-] palmtrees2309@lemm.ee 5 points 2 weeks ago

Doesnt dolphin has a terminal in built so you can watch files in gui and still use cli?

[-] Mechanite@lemmy.world 4 points 2 weeks ago

Yep you can toggle it with F4

load more comments (1 replies)
load more comments (1 replies)
[-] funkajunk@lemm.ee 9 points 2 weeks ago

I alias .. to cd ..

Works for me 🤷🏻

[-] Bonsoir@lemmy.ca 8 points 2 weeks ago

I do that too!
I also alias ... to cd ../... I'll be honest, I often forget to do it, but in theory it can speed things up.

load more comments (1 replies)
[-] SchwertImStein@lemmy.dbzer0.com 8 points 2 weeks ago
[-] some_guy@lemmy.sdf.org 8 points 2 weeks ago
alias ..='cd ..' #: up one directory
alias ...='cd ../..' #: up two directories
load more comments (1 replies)
[-] MoogleMaestro@lemmy.zip 7 points 2 weeks ago
cd .. && ls
!!
!!
!!
!!
[-] kibiz0r@midwest.social 6 points 2 weeks ago
load more comments (2 replies)
[-] Drekaridill@feddit.is 6 points 2 weeks ago

cd .. ls cd .. ls cd .. ls cd .. ls

[-] billwashere@lemmy.world 6 points 2 weeks ago* (last edited 2 weeks ago)

Or the alias I have set up

…..

load more comments (3 replies)
[-] demunted@lemmy.ml 5 points 2 weeks ago
[-] technotony@sh.itjust.works 5 points 2 weeks ago

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 ;)

load more comments (1 replies)
load more comments
view more: next ›
this post was submitted on 25 May 2025
650 points (98.2% liked)

linuxmemes

25594 readers
1583 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