-
-
Save nxtreaming/2e03e9d345b4d85f3b25ab9e0a7adab1 to your computer and use it in GitHub Desktop.
linux,tools,stats,commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Curl | |
feh --thumbnails --index-info "%n\n%wx%h" | |
feh --list | |
feh --draw-tinted --info "exifgrep '(Model|DateTimeOriginal|FNumber|ISO|Flash|ExposureTime|FocalLength.\\*)' '%f' | cut -d . -f 4-" | |
feh -t modular/setup/environment/wallpaper/ --thumb-height 120 --thumb-width 120 -S width -n -d --cache-thumbnails | |
mplayer -ss 670 -frames 1 -vo jpeg -nosound movie.avi | |
mplayer -ao null -ss 0:51:48 -endpos 15 -vo gif89a:output=16.gif:fps=17 palette,format=bgr=24 Ololo.avi | |
ffmpeg -i movie.mp4 -vcodec copy -acodec copy -ss 00:37:40 -t 00:01:10 /mnt/destvideo.mp4 | |
mencoder -ss 670 -frames 500 -o output.avi -oac copy -ovc divx4 -vop scale -zoom -xy 160 -ofps 15 src.avi | |
mplayer -vo caca video.avi | |
cat *avi | mencoder -oac copy -ovc copy -o new.avi - | |
gifsicle --delay=10 --loop *.gif > anim.gif | |
gifsicle --colors=256 --delay=4 --loopcount=0 --dither -O3 *.gif > animation.gif | |
convert -delay 20 -loop 0 *.jpg myimage.gif | |
ngrep -q -W byline "^(GET|POST) .*" | |
ngrep -q -W byline "search" host www.google.com and port 80 | |
Netcat | |
nc -z example.com 20-100 Connection to example.com 22 port [tcp/ssh] succeeded! Connection to example.com 80 port [tcp/http] succeeded! | |
nc -l 9090 | tar -xzf - ///// $ tar -czf dir/ | nc server 9090 | |
We can use Netcat to expose any application over the network. Here we expose a shell over port 8080: | |
mkfifo backpipe $ nc -l 8080 0<backpipe | /bin/bash > backpipe | |
We can now access the server from any client: | |
nc example.com 8080 uname -a Linux li228-162 2.6.39.1-linode34 ##1 SMP Tue Jun 21 10:29:24 EDT 2011 i686 GNU/Linux | |
sshuttle -r <server> --dns 0/0 | |
If you provide the --daemon argument, sshuttle will run in the background as a daemon. Combined with some other options, you can make aliases to simply and quickly start and stop tunneling your traffic: | |
alias tunnel='sshuttle --D --pidfile=/tmp/sshuttle.pid -r <server> --dns 0/0' alias stoptunnel='[[ -f /tmp/sshuttle.pid ]] && kill `cat /tmp/sshuttle.pid`' | |
Siege | |
Mitmproxy | |
curl http://betterthangrep.com/ack-standalone > ~/bin/ack | |
chmod 0755 !$ | |
tcpdump -c 2 -i eth0 | |
The following tcpdump syntax prints the packet in ASCII. | |
tcpdump -A -i eth0 | |
packets in both ASCII and HEX format. | |
tcpdump -XX -i eth0 | |
tcpdump allows you to save the packets to a file, and later you can use the packet file for further analysis. | |
tcpdump -w 08232010.pcap -i eth0 | |
You can read the captured pcap file and view the packets for analysis, as shown below. | |
tcpdump -tttt -r data.pcap | |
tcpdump -i eth0 arp | |
tcpdump -i eth0 port 22 | |
tcpdump -w xpackets.pcap -i eth0 dst 10.181.140.216 and port 22 | |
tcpdump -w comm.pcap -i eth0 dst 16.181.170.246 and port 22 | |
tcpdump -i eth0 not arp and not rarp | |
tcpdump -w comm.pcap -i eth0 src xxx.xxx.xxx.xxx and port 22 and dst xxx.xxx.xxx.xxx and port 22 | |
sar | |
iostat -p sda | |
mpstat -A | |
vmstat | |
ps -f -u wwwrun,postfix | |
ps -e -o pid,args --forest | |
free | |
top | |
Pmap | |
IPTraf | |
lsof && fstat && sockstat | |
Ntop | |
w and uptime | |
Vnstat | |
Socket Statistics – SS | |
strace ls | |
strace -e open ls | |
pmap | |
iptraf | |
mtr | |
find -iname "MyCProgram.c" -exec md5sum {} \; | |
netstat -ap | grep ssh | |
netstat -an | grep ':80' | |
netstat -a | more | |
Cacti | |
nagios | |
munin | |
Capture network capture continuously | |
The following example will capture the network packets continuously for 60 seconds. After 60 seconds of capture, it would stop automatically. capture_out contains the packets, which are flown in the network during the last 60 seconds. | |
tshark -q -w capture_out -a duration:60 | |
In the following example packets will be printed on the screen and simultaneously it will be written into the output file. | |
tshark -S -q -w capture_out -a duration:10 | |
To see how many packets are flowing in the network for a specific interval use the following command. | |
tshark -q -w capture_duration1 -a duration:1 -z io,stat,1 | |
HATop | |
==Fstab mount systems rules== | |
wdfs#http://mywebdavserver.biz/foo /mnt/локальный_каталог fuse users 0 0 | |
Также можно указать несколько опций, разделенных запятыми (например, ,username=пользователь,password=СезамОткройся,acceptsslcert) сразу после слова users. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment