Unix Tricks
31–40 of 166 posts
Re: Unix Tricks
#32You know what I hate? My history isn't aggregated in real time across all my Mac OS X terminal windows. You know what else I hate? Typing in long commands in the Mac OS X terminal and then them wrapping weirdly. Especially when I hit the up arrow to go back in my terminal history.
Are you escaping your color codes in PS1 correctly?
Bad:
PS1="\033[1;32m \w \033[m $"
Good (notice the extra \[ and \]): PS1="\[\033[1;32m\] \w \[\033[m\] $"Re: Unix Tricks
#33man hier is pretty cool. It explains the root directory structure of the system.
Re: Unix Tricks
#34 TOOLS
...
* 'tree' instead of 'ls -R'
...Re: Unix Tricks
#35You know what I hate? My history isn't aggregated in real time across all my Mac OS X terminal windows. You know what else I hate? Typing in long commands in the Mac OS X terminal and then them wrapping weirdly. Especially when I hit the up arrow to go back in my terminal history.
>You know what else I hate? Typing in long commands in the Mac OS X terminal and then them wrapping weirdly. Are you escaping your color codes in PS1 correctly? Bad: PS1="\033[1;32m \w \033[m $" Good (notice the extra \[ and \]): PS1="\[\033[1;32m\] \w \[\033[m\] $"
Re: Unix Tricks
#36man hier is pretty cool. It explains the root directory structure of the system.
Why do some distributions use /opt a lot while others don't seem to use it at all?
Re: Unix Tricks
#37Ctrl-R is by far the most useful one for me.
The article doesn't say, so it's worth mentioning that you can type ctrl-R multiple times to search further back into command history.
Re: Unix Tricks
#38It's amazing how many years I've been using bash and I still have things to discover. Ctrl-x Ctrl-e nice tip!
Re: Unix Tricks
#39One to add: Unfreezing terminal after pressing Ctrl+S by accident. Press Ctrl-Q.
If your font is all messed up, echo C-v C-o. C-v puts you into a literal mode, and C-o gets you back into the normal character set. (You probably got there by emitting a C-p at some point.)
Re: Unix Tricks
#40sort -u