What's the one Linux command you wish you knew years ago?
21–30 of 216 posts
Re: What's the one Linux command you wish you knew years ago?
#22Re: What's the one Linux command you wish you knew years ago?
#23Re: What's the one Linux command you wish you knew years ago?
#24But it's also terrifying, because it exposes how many people will post questions before using man.
Re: What's the one Linux command you wish you knew years ago?
#25I'm not sure why, but it was a while before I ran across du -h. Not sure how I ever did without it! Oh, and "sudo !!". Definitely key, along with "& disown".
Re: What's the one Linux command you wish you knew years ago?
#26Re: What's the one Linux command you wish you knew years ago?
#27100% agree with CTRL-R. It changed my life. Others that I love: screen, pdsh, perl -pi -e 's/find/replace/g' *.txt redis-cli's new ability to have piped in data be the last argument of a command. vim -o file1.txt file2.txt file3.txt (opening multiple files with vim) Using vim instead of less as a pager: cat file.txt | vim -
Re: What's the one Linux command you wish you knew years ago?
#28I'm not sure why, but it was a while before I ran across du -h. Not sure how I ever did without it! Oh, and "sudo !!". Definitely key, along with "& disown".
"!ssh" to run the most recent ssh command without having to type out the long list of arguments I use and the host name.
Host somewhere
HostName somewhere.example.com
User username
IdentityFile ~/.ssh/somewhere_key.pubRe: What's the one Linux command you wish you knew years ago?
#29ps -A | grep some text in program name
upon getting the pid
kill -9 pid
Re: What's the one Linux command you wish you knew years ago?
#30Earlier quoted context omitted.
You'll want to quote .java so the shell doesn't interpret it as a glob, and find doesn't use GNU style flags. You can also pass wc the filenames directly like this: wc -l $(find . -name '*.java')
That has different semantics (it prints one line per file) and can have line length limitations. This has the same semantics as the parent's version, but without line length issues. find . -name \*.java -exec cat {} + | wc -l