Tag: GNU

  • GNU/Linux Terminal – File Permissions! (Chmod, Chown and Chgrp)

    this tutorial content may not be accurate

  • Hack Emacs – A Technical Introduction to GNU Emacs

    this tutorial content may not be accurate

  • Shell Scripting Tutorial : View System Date, Calender

    this tutorial content may not be accurate

  • ls -X sort alphabetically by entry extension

    commandline session $ls -lX total 1144 -rwxr-xr-x 1 jeffrin jeffrin 115430 Sep 28 01:11 bwt -rwxr-xr-x 1 jeffrin jeffrin 129354 Sep 28 01:11 ds -rw-r–r– 1 jeffrin jeffrin 1063 May 18 19:23 Makefile -rw——- 1 jeffrin jeffrin 3793 Dec 13 2005 README -rwxr-xr-x 1 jeffrin jeffrin 141313 Sep 28 01:11 testlcp drwxr-xr-x 2 jeffrin jeffrin […]

  • Binary Tree Debug

    commandline session $gdb a.out GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type “show copying” and “show warranty” for details. This GDB […]

  • 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 | […]

  • R boxplot – Produce box-and-whisker plot(s) of the given (grouped) values

    R shell session > boxplot function (x, …) UseMethod(“boxplot”) > boxplot(1,2) > boxplot(1,2) > boxplot(1,2,3) > threads levels(threads) [1] “0” “1” “2” “3” “4” “5” “6” “7” “8” “9” > maximum boxplot(threads,maximum) > minimum boxplot(threads,maximum,minimum) > actual boxplot(threads,maximum,minimum,actual) > png(file=”Rboxplot.png”) > boxplot(threads,maximum,minimum,actual) > dev.off() null device 1 > FIXME : create a R boxplot image […]

  • basename – strip directory and suffix from filenames

    A UNIX Command $basename basename: missing operand Try `basename –help’ for more information. $basename /usr/bin/ bin $basename /usr/ usr $ $basename /usr/bin/less less $basename /usr/include/ma malloc.h math.h $basename /usr/include/math.h math.h $basename /usr/include/math.h . math.h $basename /usr/include/math.h .h math $basename /usr/lib/libgccpp.so.1 libgccpp.so.1 $basename /usr/lib/libgccpp.so.1 .1 libgccpp.so $ UNIX Explanation `basename’ removes any leading directory components from […]

  • truncate – shrink or extend the size of a file to the specified size

    A UNIX Command $cat example.text hello $ls -l example.text -rw-r–r– 1 jeffrin jeffrin 6 Jun 21 02:32 example.text $truncate -s 10 example.text $ls -l example.text -rw-r–r– 1 jeffrin jeffrin 10 Jun 21 02:35 example.text $hexdump example.text 0000000 6568 6c6c 0a6f 0000 0000 000000a $cat example.text hello $truncate -s 9 example.text $ls -l example.text -rw-r–r– 1 […]

  • coreutils: ls –quoting-style=c and | (pipe) symbol

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432945 output of ls –quoting-style=c is incorrect when filename contains | (pipe) symbol. Steps: mkdir /tmp/bla touch “/tmp/bla/filename with | pipe” ls –quoting-style=c /tmp/bla returns: “filename with \| pipe” thanks, -Mathieu Ref: http://groups.google.com/group/comp.lang.c/browse_thread/thread/0db8070def6a4453