Last access time for file

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);
}

Built-in lists in vim

Vimscript provides excellent support for operating on collections of data, a cornerstone of programming. In this third article in the series, learn how to use Vimscript\’s built-in lists to ease everyday operations such as reformatting lists, filtering sequences of filenames, and sorting sets of line numbers. You\’ll also walk through examples that demonstrate the power of lists to extend and enhance two common uses of Vim: creating a user-defined function to align assignment operators, and improving the built-in text completions mechanism.

URL: http://www.ibm.com/developerworks/linux/library/l-vim-script-3/index.html?ca=drs-

\"Reblog