tell(3scl)tell(3scl)NAMEtell - return current file offset for the specified file
SYNOPSIS
#include <unistd.h>
off_t tell(int fildes);
PARAMETERS
Specifies a file descriptor obtained from a successful open() or
fcntl() function
DESCRIPTION
The tell() function obtains the current file offset for the open file
specified by the fildes parameter.
SCL IMPLEMENTATION NOTES
This function is equivalent to calling lseek(fildes, 0, SEEK_CUR).
RETURN VALUES
Upon successful completion, the resulting pointer location, measured in
bytes from the beginning of the file, is returned. If tell() fails, a
value of (off_t) -1 is returned, and errno is set to indicate the
error.
ERRORS
If the tell() function fails errno may be set to one of the following
values:
The fildes parameter is not an open file descriptor. The fildes param‐
eter is associated with a pipe (FIFO), a socket, or a multiplexed spe‐
cial file.
RELATED INFORMATION
Functions: fcntl(2), lseek(2), open(2)
Manual: Solaris Compatibility Library User's Guide
tell(3scl)