There are three types of languages: 1. Imperative. 2. Functional. 3. Logical. In computer science, imperative programming is a programming paradigm that describes computation in terms of statements that change a program state. In much the same way that imperative mood in natural languages expresses commands to take action, imperative programs define sequences of commands …
Monthly Archives: October 2010
find command part 1
$cat 1 $ $cat 2 $ $find . ./2 ./1 $find . . ./2 ./1 $ls 1 2 $find . -print . ./2 ./1 $find -print . ./2 ./1 $find -name 1 ./1 $ The find command is used to locate files on a Unix or Linux system. find will search any set of director- …
Yauap . simple audio player
$yauap physics.mp3/Joy\ of\ science/Joy\ of\ Science.18.The\ Bohr\ Atom.mp3 yauap 0.2.4 (C) 2006-2008 Sascha Sommer loading url file:///home/jeffrin/Music/physics.mp3/Joy of science/Joy of Science.18.The Bohr Atom.mp3 Cannot connect to server socket err = No such file or directory Cannot connect to server socket jack server is not running or cannot be started title=The Bohr Atom artist=Audio Books album=The …
media gateway control protocol
Network Internals switch (mi->mgcp_type) { case MGCP_REQUEST: if(mi->is_duplicate){ /* Duplicate is ignored */ ms->req_dup_num++; } else { ms->open_req_num++; } break; Actions to be taken for MGCP commands. If “mi->is_duplicate” is a non-zero value, then the packet is ignored, otherwise a ty- pical value is incremented to count of a newer request. Above Explanation May Not …
www.ivarch.com/programs/pv.shtml
if (opts->argc size = sb.st_size; return; } stat, fstat, lstat – get file status stat() stats the file pointed to by path and fills in buf. fstat() is identical to stat(), except that the file to be stat-ed is specified by the file descriptor fd. Reference/Source : Linux Programmer’s Manual. pv (Pipe Viewer) can be …
kern.log part 1
$cut -d ‘ ‘ -f6-20 /var/log/kern.log [22293.016178] kjournald starting. Commit interval 5 seconds [22293.016218] EXT3-fs warning: maximal mount count reached, running e2fsck is recommended [22293.016635] EXT3 FS on sdb2, internal journal [22293.016647] EXT3-fs: mounted filesystem with ordered data mode. $ The First field shown above is a timestamp. The kernel ring buffer is not really …
mkfifo command.
$ls -l jeffrin ls: cannot access jeffrin: No such file or directory $mkfifo jeffrin $ls -l jeffrin prw-r–r– 1 jeffrin jeffrin 0 Oct 12 00:02 jeffrin $ $ls -d > jeffrin “another terminal” $cat < jeffrin . $ A “FIFO” is a special file type that permits independent processes to communicate. One process opens the …
base64 encoding
$file a.out a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped $base64 a.out > ascii.txt $tail -n 5 -f ascii.txt X19lcnJub19sb2NhdGlvbkBAR0xJQkNfMi4yLjUAX19ic3Nfc3RhcnQAX19nY292X3dyaXRlX3N1 bW1hcnkAX19nY292X3JlYWRfY291bnRlcgBzdHJjcHlAQEdMSUJDXzIuMi41AF9lbmQAZmNsb3Nl QEBHTElCQ18yLjIuNQBzdGRlcnJAQEdMSUJDXzIuMi41AGFjY2Vzc0BAR0xJQkNfMi4yLjUAZndy aXRlQEBHTElCQ18yLjIuNQBfZWRhdGEAZnByaW50ZkBAR0xJQkNfMi4yLjUAZmNudGxAQEdMSUJD XzIuMi41AG9wZW5AQEdMSUJDXzIuMi41AG1rZGlyQEBHTElCQ18yLjIuNQBtYWluAF9pbml0AA== ^C $tail -n 5 -f a.out @ @ @. @> @N @^ @n That was a peice from a.out may …
a simple hack related to xargs
$ls robinsons.iso $ls | grep robinsons.iso | xargs rm $ls robinsons.iso ls: cannot access robinsons.iso: No such file or directory $ xargs – build and execute command lines from standard input This manual page documents the GNU version of xargs. xargs reads items from the standard input, delimited by blanks (which can be protected with …
[x]args build and execute +
$ls robinsons.iso robinsons.iso $ls | grep robinsons.iso | xargs rm $ls robinsons.iso ls: cannot access robinsons.iso: No such file or directory $ xargs – build and execute command lines from standard input This manual page documents the GNU version of xargs. xargs reads items from the standard input, delimited by blanks (which can be protected …