• Salva Peiró
  • Profile
  • Education
  • Publications
  • Projects
  • Archives



tac(1) command using mmap(2)

by speiro - Oct 14, 2013 - Learning, tac, programming,

Intro

A small and efficient tac(1) UNIX® filter application written while learning mmap(1). Using this as a base case more complex programs can programmed as: tail(1) and head(1).

Usage

The tac.c source code.

$ gcc -Wall tac.c -o tac
$ ./tac tac.c | ./tac
/*
 * $File: tac.c A small and efficient tac(1) using mmap(2)
 * $URL: http://speirofr.appspot.com/files/tac.c
 * $Author: Salva Peiró <speirofr@gmail.com> (c) Copyright 2014.
 * $License: GPLv2.
 */
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <sys/mman.h>

int main(int argc, char …
more ...

Page 1 / 1

  Categories

  • CVEs
  • Infoleaks
  • Learning
  • Techniques

  Activity

  • SPADV-2018-01
  • CVE-2016-3178
  • CVE-2015-7885
  • CVE-2015-7884
  • CVE-2014-1739
  • CVE-2014-1446
  • CVE-2014-1445

  Contact

  • Linkedin
  • ResearchGate
  • Atom feed