Skip to content

Instantly share code, notes, and snippets.

@jorwan
Forked from frangeris/commands
Created August 6, 2014 20:07
Show Gist options
  • Save jorwan/c311ba84c7ccb4366294 to your computer and use it in GitHub Desktop.
Save jorwan/c311ba84c7ccb4366294 to your computer and use it in GitHub Desktop.
LOCK FILE +, UNLOCK - chattr -i /etc/httpd/conf/httpd.conf
NETWORKING
ifconfig eth0 up
history | grep ifconfig
ifconfig eth0:1 <ip>
tracert <domain>
watch "echo stats | nc 127.0.0.1 11211"
FILE PERMISSIONS
stat -c "%a %n" <folder> <file>
LINUX VERSION
cat /etc/*-release
cat /etc/redhat-release (YUM)
LINUX KERNEL VERSION
uname -a
NO PING
dhclient -v eth0
WHO'S IP
nmap -O -sS <ip>/24
SCREEN
[CREAR] screen
[LISTA] screen -list
[ENTRA] screen -r <name>
[EXIT] CTRL + a -> d
[REMOVE] screen -X -S <name> quit
[SET NAME] screen -S foo
MYSQL
kill <id_first_column>;
show full processlist;
SHOW PROCESSLIST;
mysqldump --password=<pass> --user=<user> <db_name> <tbl_name> > <filename>.sql;
mysql -p -u <user> <database> < <file>.sql
DISK STATUS
df -h
RAM:
free -m
SERVICES:
ps -aux | grep <php, py, ruby>
FIND
grep -rl "string" <folder>/
USED PORTS netstat -tulnap
lsof -i -P
WHO USE IT fuser <port>/tcp
RSYNC rsync --rsh='ssh -p11052' -aO --progress --ignore-existing --size-only * develop@50.31.79.216:/home/develop/bizficom/public_html
SPACE
du -h <folder, file>
du -sh <folder, file>
du -csh *
du -h --max-depth=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment