![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find the specific file in unix server | dsdev_123 | AIX | 3 | 03-28-2008 12:51 PM |
| find file size | hgriva1 | Shell Programming and Scripting | 6 | 11-07-2007 01:07 AM |
| command to find out total size of a specific file size (spread over the server) | abhinov | SUN Solaris | 3 | 08-08-2007 03:48 AM |
| Creat a File with a Specific Size | aldowsary | AIX | 3 | 12-14-2006 08:35 AM |
| How to test for a specific file size | GEBRAUN | UNIX for Dummies Questions & Answers | 1 | 02-20-2006 08:50 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Find the size of a single specific file
As I'm a newbie to UNIX, very newbie in fact, could anyone humour me and tell me how I'd find just the file size in bytes for a specific file?
Or at least just the specific line from the ls -a for the file - call it file1 I know this sounds bad but I don't seem to be getting very far at this one. How does one normally go about this simple task (I want to use the file size in a calculation) |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
sorry, i mean
Code:
ls -l file1 Last edited by nortypig; 08-22-2006 at 04:44 AM. |
|
#3
|
|||
|
|||
|
ls -l filename | awk '{print $5}'
if in programming lang - c use stat command on the file |
|
#4
|
|||
|
|||
|
thanks for the help, I know that one was a bit of a simple question but I had so forgotten about awk for some reason
|
|||
| Google The UNIX and Linux Forums |