[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: File size question
- To: linux-il(at-nospam)linux.org.il
- Subject: Re: File size question
- From: Alex Shnitman <alexsh(at-nospam)hectic.net>
- Date: Tue, 12 Dec 2000 15:47:26 +0200
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <3A36281C.300CDCA5@inter.net.il>; from avieal@inter.net.il on Tue, Dec 12, 2000 at 03:29:00PM +0200
- Mail-Followup-To: linux-il@linux.org.il
- References: <3A36281C.300CDCA5@inter.net.il>
- Sender: Alex Shnitman <alexsh(at-nospam)mangodsp.com>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
- User-Agent: Mutt/1.2.5i
Hi, Edward!
On Tue, Dec 12, 2000 at 03:29:00PM +0200, you wrote the following:
> Is there a system call that will give a file size (given it's name &
> path) ?
> I know that a possible answer can be the use of the system() call, and
> using ls -l| sort -bn +4 from the shell it open- but I'm looking for
> something more simple.
Yes, use the stat() call. Check "man 2 stat".
--
Alex Shnitman | http://www.debian.org
alexsh@hectic.net, alexsh@linux.org.il +-----------------------
http://alexsh.hectic.net UIN 188956 PGP key on web page
E1 F2 7B 6C A0 31 80 28 63 B8 02 BA 65 C7 8B BA
A bit of irony for you: Bill Gates claims to be trying to make a stable
operating system, while Linus Torvalds claims to be trying to take over
the world.
-- Ernie Miller
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il