Skip to content

CRDevOps/command-line-tips

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Command Line Tips

Run the last command:

$ !!

Run the last command as root:

$ sudo !!

Run the last command, starting with pattern

$ !<pattern>

Print the last command, starting with pattern

$ !<pattern>:p

Open Preview.app from command line (should work also for any other program):

$ open /Applications/Preview.app

Copy your current work directory to your clipboard (mac only):

$ printf $(pwd) | pbcopy

My Aliases

This is a list of my favorite command aliases. Feel free to copy and place them into your ~/.bash_profile file.

alias s="cd .."
alias ll='ls -l'
alias ifconfigme='curl ifconfig.me'

My ~/.inputrc

"\e[A":     history-search-backward
"\e[B":     history-search-forward
"\eOA":     history-search-backward
"\eOB":     history-search-forward

Releases

No releases published

Packages

No packages published