commandline session $scm SCM version 5e5, Copyright (C) 1990-2006 Free Software Foundation. SCM comes with ABSOLUTELY NO WARRANTY; for details type `(terms)’. This is free software, and you are welcome to redistribute it under certain conditions; type `(terms)’ for details. ;loading /usr/share/slib/require ;done loading /usr/share/slib/require.scm ;loading /usr/share/slib/require ;done loading /usr/share/slib/require.scm ;loading /usr/lib/scm/Link ;done loading /usr/lib/scm/Link.scm …
Author Archives: jeffrin
nmap – Network exploration tool and security / port scanner
commandline session $nmap –reason 127.0.0.1 Starting Nmap 6.00 ( http://nmap.org ) at 2013-09-06 21:58 IST Nmap scan report for localhost.localdomain (127.0.0.1) Host is up, received conn-refused (0.0013s latency). Not shown: 995 closed ports Reason: 995 conn-refused PORT STATE SERVICE REASON 22/tcp open ssh syn-ack 25/tcp open smtp syn-ack 111/tcp open rpcbind syn-ack 389/tcp open ldap …
Continue reading “nmap – Network exploration tool and security / port scanner”
file — determine file type
commandline session $ls faq favicon.ico index.html kernel.css mirrors pub robots.txt $file kernel.css kernel.css: ASCII text $file -l | head Set 0: Binary patterns: Text patterns: Set 1: Binary patterns: Text patterns: Set 0: Binary patterns: Strength = 340 : sc68 Atari ST music [] Strength = 340 : T64 tape Image [] $file -l | …
readelf – Displays information about ELF files
commandline session $readelf -I /bin/ping Histogram for `.gnu.hash’ bucket list length (total of 3 buckets): Length Number % of total Coverage 0 0 ( 0.0%) 1 0 ( 0.0%) 0.0% 2 0 ( 0.0%) 0.0% 3 3 (100.0%) 100.0% $readelf -a /bin/ping | head ELF Header: Magic: 7f 45 4c 46 02 01 01 00 …
Continue reading “readelf – Displays information about ELF files”
gem – the front end to RubyGems
commandline session $sudo gem install bindata Fetching: bindata-1.5.1.gem (100%) Successfully installed bindata-1.5.1 1 gem installed Installing ri documentation for bindata-1.5.1… Installing RDoc documentation for bindata-1.5.1… $
hexdump, hd — ASCII, decimal, hexadecimal, octal dump
commandline session $echo a > hex.txt $hexdump hex.txt 0000000 0a61 0000002 $ $echo b > hex.txt $hexdump hex.txt 0000000 0a62 0000002 $echo ab > hex.txt $ $hexdump hex.txt 0000000 6261 000a 0000003 $echo > hex.txt $hexdump hex.txt 0000000 000a 0000001 $echo abc > hex.txt $hexdump hex.txt 0000000 6261 0a63 0000004 $
free – it displays buffers used by the kernel
root>free -l -s 3 total used free shared buffers cached Mem: 1995396 1832704 162692 0 246952 500216 Low: 1995396 1832704 162692 High: 0 0 0 -/+ buffers/cache: 1085536 909860 Swap: 5843964 7456 58310008 total used free shared buffers cached Mem: 1995396 1832616 162780 0 246952 500216 Low: 1995396 1832704 162692 High: 0 0 0 -/+ …
Continue reading “free – it displays buffers used by the kernel”
flock – manage locks from shell scripts
commandline session $> 1 $flock 1 $ls 1 $echo 1 > 1 $cat 1 1 $ls -l total 4 -rw-r–r– 1 jeffrin jeffrin 2 Aug 11 18:24 1 $flock -n 1 $echo 1 > 1 $ls -l total 4 -rw-r–r– 1 jeffrin jeffrin 2 Aug 11 18:29 1 $1 /var/loc local/ lock/ $1> /var/lock/mylock $cat …
-p option no error if existing, make parent directories as needed
commandline session $mkdir 1 $pwd /home/jeffrin/Test $ls 1 $mkdir 2 $ls 1 2 $cd 2/ $mkdir -p hello/world $ls hello $cd hello/ $ls world $cd world/ $ls $pwd /home/jeffrin/Test/2/hello/world $cd – /home/jeffrin/Test/2/hello $pwd /home/jeffrin/Test/2/hello $ls world $ inner working mkdir.c
split – split a file into pieces . split [OPTION]… [INPUT [PREFIX]]
commandline session $ls sexample $cat sexample a b c d e f g h i j k l $split 3 sexample split: cannot open ‘3’ for reading: No such file or directory $split sexample 3 $ls 3aa sexample $ls -l total 8 -rw-r–r– 1 jeffrin jeffrin 24 Jul 31 21:52 3aa -rw-r–r– 1 jeffrin jeffrin …
Continue reading “split – split a file into pieces . split [OPTION]… [INPUT [PREFIX]]”