Thread: file size

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    3

    file size

    How do I decrease the file size?

    I have increased the file size with
    lseek(fd, size, SEEK_SET);
    write(fd,"",1);

    Now, how would I decrease the same file?

  2. #2
    Registered User
    Join Date
    Jan 2006
    Location
    Europe/Belgrade
    Posts
    78
    truncate() under libc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  3. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  4. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  5. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM