1. Tuyển Mod quản lý diễn đàn. Các thành viên xem chi tiết tại đây

File size, Linux programming

Chủ đề trong 'Hỏi đáp Tin học' bởi NguyenXuanSon, 04/07/2001.

  1. 1 người đang xem box này (Thành viên: 0, Khách: 1)
  1. NguyenXuanSon

    NguyenXuanSon Thành viên mới

    Tham gia ngày:
    22/04/2001
    Bài viết:
    7
    Đã được thích:
    0
    Hi,

    I want to get the size of very large files, more than dozen of MB. I'm programming in C under Linux. The FTELL function cannot be used because it returns LONG value whose the maximum is less than 2 MB.

    Therefore, the following code only works with files less than 2MB :

    fseek (my_file, 0, SEEK_END);
    file_size = ftell (my_file);

    Do you know another way to work around that ?
    Thank you.

Chia sẻ trang này