Good article. Rather than aliasing `cd ../.." etc. I've got this function in my setup:
up () {
local x=''
for i in $(seq ${1:-1})
do
x="$x../"
done
cd $x
}
This lets me do up 4 to go up 4 directories.
Good article. Rather than aliasing `cd ../.." etc. I've got this function in my setup:
up () {
local x=''
for i in $(seq ${1:-1})
do
x="$x../"
done
cd $x
}
This lets me do up 4 to go up 4 directories.
Is there a community for people that actually know and use linux or is this just like 'programmer'humor where morons can't exit vim, use a debugger, or RTFM?
How would you define "knowing" and "using" linux? Many people here don't use Linux professionally and only on the desktop, so they probably aren't too familiar with all the features of different cli programs.
Reading a blog post is more accessible than reading a man page. I didn't know cd -, so reading the post was worth it I'd say.
Reading a blog post is more accessible than reading a man page.
I don't agree with that assessment at all. People should learn to read manpages, instead of being spoon-fed pieces of manpages in inferior form.
Any program should have a man page, even if it only lists all options. My point is that a blog post helps some people to learn about a program. For example a post often highlights the most important options of a software.
manpages aren't guides though - they don't help much in learning new tools, especially complicated ones. They're comprehensive references, some can literally span hundreds of pages. Useful when you know what you're doing and what you're looking for, not great for learning new tools.
Some of these tips are dangerous. You generally don't want cause insensitivity in your shell. Also, ls should never be used as a subshell to find files as a part of commands.
I use that r function regularly to go to the git project root. But I call it gtop. I mostly use that and zoxide to get around.
all 21 comments