commands, hotkeys and docs
Table of Contents generated with DocToc
- bash-handbook
- commandlinefu
- hexlet basic-linux-productivity
- learnyoubash
- some bash tips
- windows2unix
command, command description, supported os
cat filename.ext
print file (linux&mac),type
wincat
orless
ortail
orhead -n10 {file}
cd ~/
home dir (shortcut), (win) we can use%HOMEPATH%
and%~%\
cd
change directory, any os.cd ..
go up, without args go to$pwd
chmod +x ~/bin/anyscript.sh
script name and rights from binclear
cp
copycurl ifconfig.co
outer ipdu --si --max-depth=1
folder sizesdu -h filename
file size,du -ha
echo $MYWAR
output a variable valueenv
create/show environment variable (linux&mac),set
(win)export MYWAR=10
save variable in envfind ./src -name "*.d.ts" | xargs echo rm | sh
remove all d.ts files from the projectgrep -inr {string}
find a string in the any file and dirgrep 'what' filename.ext
find string in file (linux&mac),find/findstr
(win)head filename.ext
first 10 lines of file (linux&mac)htop
less system.log
open paginated big file in vim mode, q-quit h-help (linux&mac)ls
show folders,ls -l
as list (linux&mac),dir
(win)man ascii
ascii tablemkdir
create directory, any os,mkdir -p test1/test2
mpv --volume=50 -playlist ~/16bit.fm_128.m3u
radiomv oldname newname
rename something (linux&mac), rename something (win)mv test2/* test1
move all from test2 to test1,move
(win)nginx 80: netstat -tulpn | grep :80 by ssh
whats using 80 portpwd
home catalog, linux&macpython -m SimpleHTTPServer 8000
webserverrm -rf * - clean dir inside, rm -rf name/*
clean dir outside (f - force)rm
remove file,rm -r
(for folder) (linux&mac),del
clean folder,rmdir
remove folder (win) or with (/s)scp <user@remote_host> <local_path>
copy file from remote to local and vise versasource ~/.bash_profile
orsource ~/.zshrc
tail filename.ext
last 10 lines of file (-f will show up to date) (linux&mac)touch filename.ext
touch
create an empty file, or upd timestamp (linux&mac),echo.>filename.ext
(win)tree -LhaC 3
show a structure with a 3 levels downtype command_name
(shows description)unset MYWAR
remove a variablewhile ( nc -l 80 < file.html > : ) ; do : ; done
webserver
man
show docs of some programm,man mkdir
(linux&mac),help
(win)
alias
shows all of themalias gl='git log'
exampleunalias gl
remove exampletype gl
will show full alias value
history
show all history, use like !numberofcommand!!
latest command!cat
latest in history
sort < filename.ext > sort
cat unsorted | sort | uniq
ls | grep filename | wc
word count - word line letter
chmod 600 id_rsa
ssh -T -p 443 [email protected]
ssh -T [email protected]
- install without mail -
Mac GPG Installer, from the gpgtools project
on gnupg.org - copy
.gpg
folder - check it with
gpg --list-secret-keys --keyid-format LONG
- opacity 90%
- colors: bg(0 43 54), text(147 161 161)
ctrl+c
- break commandctrl+z
(background,fg
- resume,bg
- resume all)