Sponsored Content
Top Forums Shell Programming and Scripting How to find size of a file in perl? Post 302848179 by MadeInGermany on Wednesday 28th of August 2013 05:01:55 PM
Old 08-28-2013
In theory the stat() system call tells about the file size.
The man page
Code:
man perlfunc

tells this about stat in perl:
Code:
                 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
                    $atime,$mtime,$ctime,$blksize,$blocks)
                        = stat($filename);

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find the file by size

Hi, Can somebody PLEASE help me. Suppose I want to find a file which has largest no of bytes in a particular directory, How do i do that. ls -s will give the size of Blocks. But I want the largest sized file and in bytes or KB OR MB. tHANKS IN advanvce. Bye Rooh :( (1 Reply)
Discussion started by: rooh
1 Replies

2. Shell Programming and Scripting

Perl FTP - check file size

The FTP perl module does not have any function which checks if the file downloaded is of size 0. Is there any way in perl to check while getting the files through FTP? Sometimes, there might be a problem with FTP and the downloaded file maybe of size 0. Hence, I would like to FTP that file... (1 Reply)
Discussion started by: rahulrathod
1 Replies

3. 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

4. Shell Programming and Scripting

find file size

My Question is ----------------- Assume you've a directory (i.e /home/test/) which contains n number of files, rename all the files which has byte count more than zero (0) with .bak extension. Write shell script to achieve this output, execute the same without using". / " in front of... (6 Replies)
Discussion started by: hgriva1
6 Replies

5. UNIX for Advanced & Expert Users

Find file size and date

Hi in my shell script I have to do this 1. there is a file called testing.txt in /home/report directory If the file size is 0(zero) and date is today's date, then I have to print "Successful" else "Failed". 2. There is a file called number.txt which will have text only one line like this... (10 Replies)
Discussion started by: gsusarla
10 Replies

6. Shell Programming and Scripting

How to find size of a file

Hi, I have to directory /usr/inbound ------------- 10900.txt 10889.txt 109290202.txt I need to create inbound directory and i need to know size of these files one by one if file size is zero i need to print message like "empty file" Please help me how to solve this thanks krish. (4 Replies)
Discussion started by: kittusri9
4 Replies

7. UNIX for Advanced & Expert Users

how to find the file size in unix

Anybody can help HOW TO FIND THE FILE SIZE IN UNIX (5 Replies)
Discussion started by: lmraochodisetti
5 Replies

8. Shell Programming and Scripting

find a file and print its size

I have a directory, /local/test/ under this directory is many subdirectories, each subdir has about 70 files, the 70 files are always the same names. I want to print to the screen the size of fileabc.txt in each of the subdirectories. I cannot seem to work with pipe and splats * because there are... (3 Replies)
Discussion started by: ajp7701
3 Replies

9. Shell Programming and Scripting

find with file size and show the size

Hi All... is the below command be modified in sucha way that i can get the file size along with the name and path of the file the below command only gives me the file location which are more than 100000k...but I want the exact size of the file also.. find / -name "*.*" -size +100000k ... (3 Replies)
Discussion started by: rpraharaj84
3 Replies

10. UNIX for Dummies Questions & Answers

Recursive Find on file size

Is there a way to use the find command to recursively scan directories for files greater than 1Gb in size and print out the directory path and file name only? Thanks in advance. (6 Replies)
Discussion started by: jimbojames
6 Replies
TKPP(1) 						User Contributed Perl Documentation						   TKPP(1)

NAME
tkpp - frontend to pp written in Perl/Tk. SYNOPSIS
You just have to execute command line : tkpp DESCRIPTION
Tkpp is a GUI frontend to pp, which can turn perl scripts into stand-alone PAR files, perl scripts or executables. You can save command line generated, load and save your Tkpp configuration GUI. Below is a short explanation of tkpp GUI. Menu File -> Save command line When you build or display command line in the Tkpp GUI, you can save the command line in a separated file. This command line can be executed from a terminal. File -> Save configuration You can save your GUI configuration (all options used) to load and execute it next time. File -> Load configuration Load your saved file configuration. All saved options will be set in the GUI. File -> Exit Close Tkpp. Help -> Tkpp documentation Display POD documentation of Tkpp. Help -> pp documentation Display POD documentation of pp. Help -> About Tkpp Display version and authors of Tkpp. Help -> About pp Display version and authors of pp ( pp --version). Tabs GUI There are five tabs in GUI : General Options, Information, Size, Other Options and Output. All tabs contain all options which can be used with pp. All default pp options are kept. You can now set as you want the options. When your have finished, you can display the command line or start building your package. You will have the output tab to see error or verbose messages. NOTES
In Win32 system, the building is executed in a separate process, then the GUI is not frozen. The first time you use Tkpp, it will tell you to install some CPAN modules to use the GUI (like Tk, Tk::ColoredButton...). SEE ALSO
pp, PAR AUTHORS
Tkpp was written by Doug Gruber and rewrite by Djibril Ousmanou. In the event this application breaks, you get both pieces :-) COPYRIGHT
Copyright 2003, 2004, 2005, 2006, 2011 by Doug Gruber <doug(a)dougthug.com>, Audrey Tang <cpan@audreyt.org> and Djibril Ousmanou <djibel(a)cpan.org>. Neither this program nor the associated pp program impose any licensing restrictions on files generated by their execution, in accordance with the 8th article of the Artistic License: "Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package." Therefore, you are absolutely free to place any license on the resulting executable, as long as the packed 3rd-party libraries are also available under the Artistic License. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.16.2 2012-01-09 TKPP(1)
All times are GMT -4. The time now is 03:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy