A directory is a file that contains several entries where each entry is an inode number and a name. Is is possible that a directory will get to be 50 MB but that would be a lot of entries. You probably mean the sum of the sizes of all the files and subdirectories in a directory. That is a different concept and has little to do with the size of the directory itself.
Yes I meant the sum of all files and sub-directories in the directory.
We have instances where some of the directories (total sum) are very large due to logging etc. So to keep it clean, I was tasked with setting up a cron to clean up directories based on condition.
I have a huge file which contains multiple lines. It need to check whether character length is not more than 255 each line. If its not then it should remove the
character up to column. I have described in the output below. If its more than that
the next line should start with call but if the... (1 Reply)
Hello All,
I have a file which contain below lines. The starting word of each line is call and the end line is semi colon. I need to find the character size of each line and then move it to a file. If the character size is more than 255 then I need to push that line to a next file and I need... (6 Replies)
HI,
Can anyone tell me how to pull the date and file name separated by a space using the find command or any other command. I want to look through several directories and based on a date timeframe (find -mtime -7), output the file name (without the path) and the date(in format mmddyyyy) to a... (2 Replies)
My unix version is IBM AIX Version 6.1
I tried google my requirement and found the below answer,
find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20"
But newer command is not working in AIX version 6.1 unix
I have given my requirement below:
Input:
atr files:
... (1 Reply)
I have file listed like below
-rw-r--r--+ 1 test test 17M Nov 26 14:43 test1.gz
-rw-r--r--+ 1 test test 0 Nov 26 14:44 test2.gz
-rw-r--r--+ 1 test test 0 Nov 27 10:41 test3.gz
-rw-r--r--+ 1 test test 244K Nov 27 10:41 test4.gz
-rw-r--r--+ 1 test test 17M Nov 27 10:41 test5.gz
I... (5 Replies)
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)
I'm sure this has been asked before but I couldn't find it with the search. I have a script that looks for files and then moves to another location for further processing. My problem is I can't seem to prune the .s* directories. It doesn't break anything just wanted a cleaner process.
Here... (4 Replies)
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)
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)
Hi Folks
I am pretty new to unix and shellscripting.
I need help on writing logic on traversing recursively through a set of directories under a top-level folder and delete files(mostly text) which are 1 month old.
Can you people help me on this?
Thanks a lot
Ravi (5 Replies)