Category: Uncategorized

  • Sum and multiplication

    $ls first-example first-example.c new-sum.c sum sum.c $cat new-sum.c #define _XOPEN_SOURCE 500 #include <stdio.h> #include <stdlib.h> #include <unistd.h> void printhelp(char progname[]); int main(int argc, char *argv[]) { int i, opt, sum; /* Simple sanity check */ if (argc == 1) { printhelp(argv[0]); return 1; } /* Parse command-line options */ while ((opt = getopt(argc, argv, “smh”)) […]

  • Sum of numbers

    $lsfirst-example first-example.c new-sum.c sum.c$gcc sum.c -o sum$cat sum.c #include <stdio.h>#include <stdlib.h>void printhelp(char progname[]); int main(int argc, char *argv[]){int i;int sum = 0; /* Simple sanity check */if (argc == 1){printhelp(argv[0]);return 1;} for (i=1; i<argc; i++){sum = sum + atoi(argv[i]);}printf(“Total sum: %i\n”, sum);return 0;} void printhelp(char progname[]){printf(“%s integer …\n”, progname);printf(“This program takes any number of ” […]

  • Hello World

    $lsfirst-example.c new-sum.c sum.c$cat first-example.c #include <stdio.h>int main(void){printf(“Hello, world!\n”);return 0;}$gcc first-example.c -o first-example$./first-exampleHello, world!$

  • Lec 1 | MIT 6.002 Circuits and Electronics, Spring 2007

  • Graph for Sorting plotted using R

    The following graph shows the time details to execute a sorting algorithm written in python. The values for plotting the above graph is taken from the following readings. Fri May 16 21:36:17 IST 2014 real 0m0.019s user 0m0.016s sys 0m0.000s real 0m0.021s user 0m0.016s sys 0m0.004s real 0m0.024s user 0m0.020s sys 0m0.000s real 0m0.020s user […]

  • gnome-shell – Graphical shell for the GNOME desktop

    $gnome-shell org.gnome.Shell already exists on bus and –replace not specified $gnome-shell –replace Window manager warning: Log level 16: Attempt to add property Gjs_MonitorConstraint::primary after class was initialised Window manager warning: Log level 16: Attempt to add property Gjs_MonitorConstraint::index after class was initialised Window manager warning: Log level 16: Error converting selection Window manager warning: Log […]

  • Crash: glibc: compile from upstream source related

    Log Report Related the following content may not be accurate. 1. unable to find getty program upstream source. 2. need to get libc-2.14 for getty. 3. trying to upgrade another system to get libc-2.14 4. is it possible to get multiple versions of glibc installed on a same system. compile another version of glibc and […]

  • uptime w whoami id hostname apropos whatis

    commandline session $uptime 20:57:47 up 1:41, 3 users, load average: 0.64, 0.71, 0.70 $ $w 20:57:49 up 1:41, 3 users, load average: 0.64, 0.71, 0.70 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT jeffrin tty7 :0 19:16 1:41m 3:50 0.04s gdm-session-worker [pam/gdm3-autologin] jeffrin pts/0 :0 20:52 1:25 0.08s 0.08s bash jeffrin pts/1 :0 20:57 5.00s […]

  • apt-get (8) – APT package handling utility – – command-line interface

    commandline session NO WARRANTY $sudo apt-get remove cowsay [sudo] password for jeffrin: Reading package lists… Done Building dependency tree Reading state information… Done The following packages were automatically installed and are no longer required: cpp-4.7 libdrm-nouveau1a libmpc2 linux-headers-3.11-1-common linux-kbuild-3.11 Use ‘apt-get autoremove’ to remove them. The following packages will be REMOVED: cowsay 0 upgraded, 0 […]

  • -mtime n File’s data was last modified n*24 hours ago

    commandline session $find . -mtime +1000000 $find . -mtime +100000 $find . -mtime +10000 $find . -mtime +1000 ./wallphotos-old ./wallphotos-old/8002_1600x1200-wallpaper-cb1267712759.jpg ./wallphotos-old/18738_1600x1200-wallpaper-cb1271712460.jpg ./wallphotos-old/3767_1600x1200-wallpaper-cb1267712187 (1).jpg ./wallphotos-old/8020_1600x1200-wallpaper-cb1267712767.jpg ./wallphotos-old/3664_1600x1200-wallpaper-cb1267712118.jpg ./wallphotos-old/17801_1600x1200-wallpaper-cb1273013536.jpg $