Your SlideShare is downloading. ×
0
5 Time Saving Bash Tricks
5 Time Saving Bash Tricks
5 Time Saving Bash Tricks
5 Time Saving Bash Tricks
5 Time Saving Bash Tricks
5 Time Saving Bash Tricks
5 Time Saving Bash Tricks
5 Time Saving Bash Tricks
5 Time Saving Bash Tricks
5 Time Saving Bash Tricks
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

5 Time Saving Bash Tricks

8,361

Published on

Presented by Nikhil Mungel at DevOpsDays Bangalore 2011.

Presented by Nikhil Mungel at DevOpsDays Bangalore 2011.

Published in: Technology, Education
3 Comments
6 Likes
Statistics
Notes
No Downloads
Views
Total Views
8,361
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
3
Likes
6
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 5 Time Saving Bash Tricks<br />Nikhil Mungel @hyfather<br />
  • 2. Fun with Control and Meta<br />
  • 3. Meta-Dot and friends<br />scp ~/source/tree/file.cnikhilm@server.tw.com:.<br />M-.<br />nikhilm@server.tw.com:.<br />Yank the last argument to previous command.<br />M-C-y<br />~/source/tree/file.c<br />Yank the first argument to previous command.<br />
  • 4. Killing and Yanking<br />C-k<br />Kill text till end-of-line.<br />C-y<br />Yanks it back!<br />M-y<br />Cycle through the kill-ring.<br />
  • 5. Bang through the History!<br />!!<br />Substitute previous command.<br />$ sudo !!<br />
  • 6. SSH multiplexing<br />http://bit.ly/bashtips<br />~/.ssh/config<br />Host *<br />ControlMaster auto<br />ControlPath /tmp/%r0%h:%p<br />
  • 7. pushdand popd<br />A stack of directories!<br />$ pushd .<br />$ popd<br />
  • 8. Multi-Session History<br />http://bit.ly/bashtips<br />~/.bashrc<br />$ shopt –s histappend<br />
  • 9. tail -f httpd.log &amp;<br />http://bit.ly/bashtips<br />Share STDOUTbetween the REPL and the tail.<br />Even the shell itself is a REPL (!)<br />No switching tabs.<br />
  • 10. Thanks!<br />http://bit.ly/bashtips<br />Nikhil Mungel<br />@hyfather<br />

×