Installing Sofware on Linux, easier and finding alternates.

2010-02-03 1 min read Linux

There are already some great blogs on this, why write another one. Let me just point you to the best one <a href="http://http://blogs.computerworld.com/installing_linux_software_101_for_windows_users" target="_blank">here.

Here are sites that will help you find the alternative to your favourite Windows programs:

  1. <a href="http://www.osalt.com/" target="_blank">http://www.osalt.com/

  2. <a href="http://wiki.linuxquestions.org/wiki/Linux_software_equivalent_to_Windows_software" target="_blank">http://wiki.linuxquestions.org/wiki/Linux_software_equivalent_to_Windows_software

  3. <a href="http://www.linuxalt.com/" target="_blank">http://www.linuxalt.com/

Last access time for file

2010-02-03 1 min read C Programs Linux

The C program will print the last access time for the file.

This is quite helpfull program when you want to find old files. Modifying the source to take the filename as argument and take multiple arguments is left as an exercise.

#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <time.h>
#include <stdlib.h>
int main(void)
{
    char datestring[80];
    struct  stat a;
    //int fd = open("ak",O_RDONLY);
    if (stat ("iptc.c", &a) == -1) {
        perror("stat");
        printf (" Error");
        return;
    }
    printf (" Last Access Time is %s", ctime(&a.st_atime));
    printf (" Last Access Time is %s", a.st_atime);
}

Continue reading

Built-in lists in vim

2010-02-03 1 min read Learning Linux Vim Tips

<a class="zem_slink freebase/en/vimscript" title="Vimscript" rel="wikipedia" href="http://en.wikipedia.org/wiki/Vimscript">Vimscript provides excellent support for operating on collections of <a class="zem_slink freebase/en/data" title="Data" rel="wikipedia" href="http://en.wikipedia.org/wiki/Data">data, a cornerstone of programming. In this third article in the series, learn how to use Vimscript&#8217;s built-in lists to ease everyday operations such as reformatting lists, filtering sequences of filenames, and sorting sets of line numbers. You&#8217;ll also walk through examples that demonstrate the power of lists to extend and enhance two common uses of <a class="zem_slink freebase/en/vim" title="Vim (text editor)" rel="homepage" href="http://www.vim.org/">Vim: creating a <a class="zem_slink freebase/en/user_defined_function" title="User-defined function" rel="wikipedia" href="http://en.wikipedia.org/wiki/User-defined_function">user-defined function to align assignment operators, and improving the built-in text completions mechanism.

Continue reading

Understand Awk Variables with 3 Practical Examples

2010-01-28 1 min read Learning Linux

<a id="aptureLink_gQhJKQ92Kn" style="padding: 0px 6px; float: left;" href="http://www.gnu.org/software/gawk/manual/gawk.html"><img style="border: 0px none;" title="The GNU Awk User's Guide" src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/ph/400x270_WebClip" alt="" width="400px" height="270px" />

<a id="aptureLink_CLV4LbC1Dr" style="padding: 0px 6px; float: right;" href="http://gnuwin32.sourceforge.net/packages/mawk.htm"><img style="border: 0px none;" title="Mawk for Windows" src="http://blog.amit-agarwal.com/wp-content/uploads/img.zemanta.com/ph/400x270_WebClip" alt="" width="400px" height="270px" /> This article is part of the on-going Awk Tutorial and Examples series. Like any other <a class="zem_slink freebase/en/programming_language" title="Programming language" rel="wikipedia" href="http://en.wikipedia.org/wiki/Programming_language">programming languages, Awk also has user defined variables and built-in variables. In this article let us review how to define and use <a class="zem_slink freebase/en/awk" title="AWK" rel="homepage" href="http://cm.bell-labs.com/cm/cs/awkbook/index.html">awk variables. Awk variables should begin with the letter, followed by it can consist of alpha numeric characters or underscore. Keywords […]

Continue reading

statifier — Dynamic to Static

2010-01-24 2 min read Linux

<a href="http://statifier.sourceforge.net/">Homepage of statifier.

<span style="font-size: xx-small;"><span style="font-size: xx-small;">Statifier create from dynamically linked executables and all it&#8217;s libraries one file.
This file can be copied and run on another machine without need to drag all it&#8217;s libraries.

<span style="font-size: xx-small;"><span style="font-size: xx-small;">Dynamically linked executables are smaller then statically linked.
From the other side dynamically linked executables use shared libraries compiled in PIC (position independend code) which is slower than &#8221;normal&#8221; one.

Continue reading

Short Information about loaded kernel modules

2010-01-24 2 min read Linux

There are couple of ways you can find the information on the <a class="zem_slink" title="Loadable kernel module" rel="wikipedia" href="http://en.wikipedia.org/wiki/Loadable_kernel_module">loadable kernel modules. All these would always involve calling <a class="zem_slink" title="Lsmod" rel="wikipedia" href="http://en.wikipedia.org/wiki/Lsmod">lsmod to get the loaded kernel modules and then calling modinfo to get the info on the loaded modules. I will show you with examples:

$ lsmod
Module                  Size  Used by
cdc_acm                19616  0
vfat                    8744  9
fat                    41836  1 vfat

Continue reading
Older posts Newer posts