Linux Tips And Tricks

Arpit Mohan on August 23, 2018

It seems that publishing a post of Linux tips & tricks is a rite of passage that all engineers must go through. More importantly, it's a book... [Read Full]
markdown guide

While the list is quite nice, and I couldn't agree more about vim, these are all standalone programs, not limited to bash.

Maybe worth to mention that you don't need the command colon in less, a simple button press should do in most cases. Also I believe pressing v, should open vi directly from the file. That makes it convenient to just preview, find stuff, and edit right away.


Crap, I never realized that I didn't need the colon in the less command. Always used it like vi (muscle memory) and never bothered to check on this. Thanks! #TIL


You should see it like this: the Devs of less were clever enough to not make the colon a problem for vi. Probably because they were using vi ;)


I literally cringe every time I see the -exec flag used with find. Pipe your find to xargs. Your system will thank you. :)


One of the reasons that I like -exec is that it makes the find command complete in it's own right.

Also, using the syntax find -name "*.java" -exec grep Main {} \+ is equivalent to xargs in terms of performance. Also it's shorter to type as compared to find -name "*.java" -print0 | xargs -0 grep "Main"


I'm an old guy. Even in the early 2000s (nearly 10 years into my career), using find with its -exec flag — rather than piping things through xargs — was a great way to bring a system to its knees. Between the slowness of storage and blowing out the process-table space on the much lower memory systems, at the time, you kind of habituated to shuddering at just the thought of someone using -exec. Painful memories die hard, even when you know the apparent cost barely registers, any more.


I didnt know about entr command, i am looking forward to try it. Thank you! :)

code of conduct - report abuse