#1 ZSH
Thats a lie, we use the command line a lot
#2 Dotfiles
Check out Matti's VIM docs
cp /home/foo/realllylongname.cpp{,-old}
Example Source: user10767
cd -
!!
Most usefull in
sudo !!
Example Source: amrox
$ ehco foo bar baz
bash: ehco: command not found
$ ^ehco^echo
foo bar baz
Example Source: Seth
Alt + Click
lets you place your cursor by clickingCtrl + A
moves your cursor to the beginning of the lineCtrl + C
cancels a command (duh)
Get the output of command A and use it as the input for command B. Example: List all files (including dotfiles using -a
) and find a file which name contains names
ls -a | grep names
touch super-rad-kittens.html
echo "contents of file" > filename.md
echo "appending this to file" >> filename.md
Use the -R
flag for folders
mv current-filename.md new-filename.md
Use the -R
flag for folders
cp filename.md filename-2.md
In some (most actually) cases its super usefull to use rsync
instead of cp
when copying entire folders. This skips all files that are already in the destination and unchanged.
rsync ./ ~/path/to/dest/
Super duper usefull for copying files to a server.
If you're not familiar with RegExp learn it. No I'm serious, start right now, you won't regret it.
grep -E "\d" k1ttens