Sponsored Content
Full Discussion: Command to get file size..
Top Forums UNIX for Dummies Questions & Answers Command to get file size.. Post 302148223 by preethgideon on Friday 30th of November 2007 08:48:10 AM
Old 11-30-2007
Thank you for teaching me a new command.

But ls -s <file name> also gives in blocks itself right ? [ correct me if I am wrong ]

xx51007@edcuxdv3 /home/xx51007 > ls -s clscrn.pc
62 clscrn.pc

Also stat does not work in my system [ HP-UX] Smilie

Regards,
Gideon.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File size limitation of unix sort command.

hi , iam trying to sort millions of records which is delimited and i cant able to use sort command more than 60 million..if i try to do so i got an message stating that "File size limit exceeded",Is there any file size limit for using sort command.. How can i solve this problem. thanks ... (7 Replies)
Discussion started by: cskumar
7 Replies

2. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

3. UNIX for Dummies Questions & Answers

Extracting only file size of the ls -ltr command.

All, I only need to get the file size when I do an ls -ltr filename.txt Could you give me the exact syntax. Thanks KOP (6 Replies)
Discussion started by: kingofprussia
6 Replies

4. HP-UX

command to list file size

I'm new to HP-UX and am looking for the command that will allow to me determine the total size of listed files. I'm being told that my backup selection is exceeding my tape drive size and need to determine how much information is being backed up. Help? (3 Replies)
Discussion started by: rgordon
3 Replies

5. Shell Programming and Scripting

command to read file name and size

hi all, there is any command or anything we can use to read the file name and size. thanks (6 Replies)
Discussion started by: s_linux
6 Replies

6. Shell Programming and Scripting

command to reduce size of file/directory???

Hello, I want to compress any given file or directory. I used 1)gzip 2)zip But when I do "ls -l". I found that the zipped file is in fact greater in size than the original file. Can you please tell me the commands which will show me the difference in its size. (2 Replies)
Discussion started by: nsharath
2 Replies

7. HP-UX

Performance issue with 'grep' command for huge file size

I have 2 files; one file (say, details.txt) contains the details of employees and another file (say, emp.txt) has some selected employee names. I am extracting employee details from details.txt by using emp.txt and the corresponding code is: while read line do emp_name=`echo $line` grep -e... (7 Replies)
Discussion started by: arb_1984
7 Replies

8. Shell Programming and Scripting

Script to monitor for new file with ext .err and size > 0 bytes and perform a action or command

Hi All, I need to create a script to monitor a dir for new files with ext .err and also it should b a non empty files. and perform a action or command . We have a new ETL application that runs on a linux server, every times a etl fails it creates a .err file or updates the existing .err... (4 Replies)
Discussion started by: MAKHAN
4 Replies

9. HP-UX

find command to display size and date of a file

Hi, The blow code does not yeild any output. find . -name "*.jar" -o -name "*.ksh" -o -name "*.properties" -name "*.war" -o -name "*.ear" -o -name "*.sh" -o -name "*.cfg" -exec ls -l {} \; I wish to print the filename filesize filedate in HP-UX. Can anyone help ? (9 Replies)
Discussion started by: mohtashims
9 Replies
STAT(1) 							   User Commands							   STAT(1)

NAME
stat - display file or file system status SYNOPSIS
stat [OPTION]... FILE... DESCRIPTION
Display file or file system status. -L, --dereference follow links -f, --file-system display file system status instead of file status -c --format=FORMAT use the specified FORMAT instead of the default; output a newline after each use of FORMAT --printf=FORMAT like --format, but interpret backslash escapes, and do not output a mandatory trailing newline. If you want a newline, include in FORMAT -t, --terse print the information in terse form --help display this help and exit --version output version information and exit The valid format sequences for files (without --file-system): %a Access rights in octal %A Access rights in human readable form %b Number of blocks allocated (see %B) %B The size in bytes of each block reported by %b %C SELinux security context string %d Device number in decimal %D Device number in hex %f Raw mode in hex %F File type %g Group ID of owner %G Group name of owner %h Number of hard links %i Inode number %m Mount point %n File name %N Quoted file name with dereference if symbolic link %o I/O block size %s Total size, in bytes %t Major device type in hex %T Minor device type in hex %u User ID of owner %U User name of owner %w Time of file birth, human-readable; - if unknown %W Time of file birth, seconds since Epoch; 0 if unknown %x Time of last access, human-readable %X Time of last access, seconds since Epoch %y Time of last modification, human-readable %Y Time of last modification, seconds since Epoch %z Time of last change, human-readable %Z Time of last change, seconds since Epoch Valid format sequences for file systems: %a Free blocks available to non-superuser %b Total data blocks in file system %c Total file nodes in file system %d Free file nodes in file system %f Free blocks in file system %i File System ID in hex %l Maximum length of filenames %n File name %s Block size (for faster transfers) %S Fundamental block size (for block counts) %t Type in hex %T Type in human readable form NOTE: your shell may have its own version of stat, which usually supersedes the version described here. Please refer to your shell's docu- mentation for details about the options it supports. AUTHOR
Written by Michael Meskes. REPORTING BUGS
Report stat bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report stat translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
stat(2) The full documentation for stat is maintained as a Texinfo manual. If the info and stat programs are properly installed at your site, the command info coreutils 'stat invocation' should give you access to the complete manual. GNU coreutils 8.12.197-032bb September 2011 STAT(1)
All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy