Search for: SEARCH
Category Archives: Uncategorized
head – output the first part of files
commandline session $cat bash.txt hack hacker $head bash.txt hack hacker $head -n 1 bash.txt hack $head -n 2 bash.txt hack hacker $head -n 3 bash.txt hack hacker $head -v -n 1 bash.txt ==> bash.txt bash.txt <== hack hacker $ http://www.gnu.org/software/coreutils/manual/html_node/head-invocation.html $ head -n 1 qsort.c #include $ head -n 2 qsort.c #include $ head -n …
GET THE HANG bundle install
$sudo bundle install Fetching gem metadata from https://rubygems.org/…….. Fetching gem metadata from https://rubygems.org/.. Resolving dependencies… Using rake (0.9.2.2) Installing RedCloth (4.2.9) Installing chunky_png (1.2.5) Installing fast-stemmer (1.0.1) Installing classifier (1.3.3) Installing fssm (0.2.9) Installing sass (3.2.9) Installing compass (0.12.2) Installing directory_watcher (1.4.1) Installing haml (3.1.7) Installing kramdown (0.13.8) Installing liquid (2.3.0) Installing syntax (1.0.0) Installing …
getopt . more on parse command options
commandline session $getopt hello — $getopt helloo — $getopt hellooo — $getopt hellooo how — how $getopt hellooo how are — how are $getopt h how are — how are $getopt h h h — h h $getopt ab -a -a — $getopt ab -ab -a -b — $getopt ab -ab -R getopt: invalid option …
vmstat . more on virtual memory statistics
commandline session $vmstat -s 1995396 K total memory 1197836 K used memory 599976 K active memory 483048 K inactive memory 797560 K free memory 49620 K buffer memory 648028 K swap cache 5843964 K total swap 0 K used swap 5843964 K free swap 261891 non-nice user cpu ticks 534 nice user cpu ticks 68515 …
Continue reading “vmstat . more on virtual memory statistics”
stat . more from stat command
commandline session $ls store store1 $pwd /home/jeffrin/Test $stat store File: ‘store’ Size: 19 Blocks: 8 IO Block: 4096 regular file Device: 801h/2049d Inode: 7036935 Links: 1 Access: (0644/-rw-r–r–) Uid: ( 1000/ jeffrin) Gid: ( 1000/ jeffrin) Access: 2013-06-29 18:37:33.000000000 +0530 Modify: 2013-06-29 18:37:30.000000000 +0530 Change: 2013-06-29 18:37:30.000000000 +0530 Birth: – $stat -f store File: “store” …
tee . using examples
commandline session $ls | tee $ls -l | tee total 0 $pwd | tee /home/jeffrin/Test $pwd /home/jeffrin/Test $pwd | tee store /home/jeffrin/Test $cat store /home/jeffrin/Test $pwd > store1 $cat store1 /home/jeffrin/Test $ http://pluto.infoclub.in/wp-content/uploads/2013/06/tee.c
nc netcat
commandline session $nc 127.0.0.1 25 220 debian.Jeff ESMTP Exim 4.80 Thu, 27 Jun 2013 00:05:20 +0530 ^C $nc gnu.org no port[s] to connect to $nc gnu.org 25 ^C $nc -g gnu.org 25 no port[s] to connect to $nc -g gnu.org gnu.org 25 ^C $nc -g 127.0.0.1 127.0.0.1 25 ^C $nc www.youtube.com no port[s] to connect …
pstree display a tree of processes
commandline session $pstree -A jeffrin at-spi2-registr—{at-spi2-registr} dbus-daemon dbus-daemon dbus-launch dbus-launch dconf-service—2*[{dconf-service}] gconfd-2 gnome-session-+-at-spi-bus-laun-+-dbus-daemon | `-3*[{at-spi-bus-laun}] |-bluetooth-apple—{bluetooth-apple} |-gdu-notificatio |-gnome-fallback—-2*[{gnome-fallback-}] |-gnome-panel-+-chrome-+-chrome | | |-chrome-sandbox—chrome-+-chrome-+-chrome—11*[{c+ | | | | `-3*[chrome—3*[+ | | | `-nacl_helper_boo | | `-31*[{chrome}] | |-gnome-terminal-+-bash—pstree | | |-bash | | |-gnome-pty-helpe | | `-3*[{gnome-terminal}] | `-3*[{gnome-panel}] |-gnome-screensav—2*[{gnome-screensav}] |-gnome-settings–+-sh | `-3*[{gnome-settings-}] |-gnome-sound-app—{gnome-sound-app} |-metacity—3*[{metacity}] |-nm-applet—3*[{nm-applet}] |-notification-da—{notification-da} …
using quotes with GNU Bash
commandline session $echo ‘hello’ hello $echo “hello” hello $echo ‘ls’ ls $echo `ls` $echo `ls -l` total 0 $echo ‘ls -l’ ls -l $