this post was submitted on 24 Nov 2023
65 points (94.5% liked)
Linux
48083 readers
683 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Good article. Rather than aliasing `cd ../.." etc. I've got this function in my setup:
This lets me do
up 4
to go up 4 directories.You could also do a "up" for one up "upp" for 2 and "upppp" for 4 because of fun
True. That is something that could be done.
Oh I really like this. I never had an alias for this since I need to do multiple backwards cds very rarely, but I might just copy this
I have the zsh option autopushd set which calls pushd in interactive shells for every cd, that way 90% of the time when I want to go back up to another path I can just use popd
Go for it. I've been using it for years without a problem.
Holy shit
I use Fish and have keybinds for previous and next directory, 99% of the time when going up in a directory it's to (one of) the previous directory/ies I was in
Look into zoxide.
z direc
Will take you to the most used directory starting with "direc" eg "/home/me/random/directory"
I've tried things like that before but never got on with them. I found when I had many projects with similar directory structures it was easy to end up in the wrong place and took more thought to get to the right place than just cding
The dir's are the same names or similar? A few extra key strokes to get the fullname should be easier than cd'ing back and forth.
There's also z foo "space" "tab" as per docs to get interactive list for matches.
But, just a suggestion!