Finding directory and sub-directories individual size in Perl


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Finding directory and sub-directories individual size in Perl
# 1  
Old 02-01-2010
Finding directory and sub-directories individual size in Perl

Hi,
Can anyone redirect to an existing thread or provide some info on how to find the size of a directory and it's sub-directories using a single script ?

I tried finding a similar thread but in vain.

I'm a newbie and any help would be greatly appreciated.

Thanks in advance.
# 2  
Old 02-01-2010
Is it homework?
# 3  
Old 02-01-2010
https://www.unix.com/unix-dummies-que...imum-size.html

---------- Post updated at 05:02 PM ---------- Previous update was at 04:56 PM ----------

more links

https://www.unix.com/cfmgoogle.php?cx...directory#1302
# 4  
Old 02-02-2010
Thanks for the info
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Debian

Finding out size of sub-directory

Hi, Is there a way to find out the size of a sub-directory? Eg subidrectory in main directory /data, like this : /data/solr-5.3.1. When I do a df -h /data/solr-5.3.1, it still gives the size of /data: root@L28condor:/data/solr-5.3.1# df -h . Filesystem Size Used... (1 Reply)
Discussion started by: anaigini45
1 Replies

2. Shell Programming and Scripting

Finding non-existing words in a list of files in a directory and its sub-directories

Hi All, I have a list of words (these are actually a list of database table names separated by comma). Now, I want to find only the non-existing list of words in the *.java files of current directory and/or its sub-directories. Sample list of words:... (8 Replies)
Discussion started by: Bhanu Dhulipudi
8 Replies

3. Shell Programming and Scripting

Perl script for finding directories with mtime

Need assistance in the perl script . Below script gives me the results of all the files and directories with mtime with no issues . But i wanted to have a file and specify all the directory locations and use that file as reference and get results . Any ideas are highly Appreciated . ... (6 Replies)
Discussion started by: ajayram_arya
6 Replies

4. HP-UX

Individual file size limit on HP-UX

I got a question on ulimit on HP-UX. I have a log file that gets more than 2 GB and the application crashes because it can not write to log. I browsed through the forum and found one very similar post on ulimit but that was not concluded. Did some analysis and below is some output. >getconf... (6 Replies)
Discussion started by: asutoshch
6 Replies

5. UNIX for Dummies Questions & Answers

Finding size of all directories

Alright so I've tried a couple different things that at first glance, looked like they worked. find . -maxdepth 5 -type d -daystart -mtime 1 | xargs du -h Which seems to ignore the previous commands such as depth and modified time. find .. -maxdepth 2 -type d -daystart -ctime 1 | xargs... (8 Replies)
Discussion started by: Aussiemick
8 Replies

6. UNIX for Dummies Questions & Answers

Setting up existing Directories using facls to recursively add an individual user

I've been working with Solaris/Linux for about 4 months now. Let me explain the scenario. There will be two users involved. The owner (curOwner) and the new user (newUser). The server in question is a Solaris 10 box. So curOwner runs an application that is constantly writing logs to lets say.... (2 Replies)
Discussion started by: amadont12
2 Replies

7. Shell Programming and Scripting

Shell script to execute commands in individual users' home directories

Hi, I am trying to write a shell script which execute certain commands within certain folders in each user's home directories I started off with a bash script - #!/bin/csh -f su -l cvsusr1 cvs -d /home/cvsadm/repository status But the shell script finishes immediately after... (1 Reply)
Discussion started by: rupa_lahiri
1 Replies

8. Shell Programming and Scripting

Script for parsing directories one level and finding directories older than n days

Hello all, Here's the deal...I have one directory with many subdirs and files. What I want to find out is who is keeping old files and directories...say files and dirs that they didn't use since a number of n days, only one level under the initial dir. Output to a file. A script for... (5 Replies)
Discussion started by: ejianu
5 Replies

9. Shell Programming and Scripting

finding duplicate files by size and finding pattern matching and its count

Hi, I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern. Note:These are the samples of two files,but i can have more... (2 Replies)
Discussion started by: jerome Sukumar
2 Replies

10. UNIX for Dummies Questions & Answers

list file's by size order in sepecfied directory and sub directories

How do I list files of type "*.file" for example by size order recursively ? (2 Replies)
Discussion started by: ferretman
2 Replies
Login or Register to Ask a Question