10 More Discussions You Might Find Interesting
1. AIX
Hi.
My example:
I have a filesystem /log. Everyday, log files are copied to /log. I'd like to set owner and permission for files and directories in /log like that
chown -R log_adm /log/*
chmod -R 544 /log/*It's OK, but just at that time. When a new log file or new directory is created in /log,... (8 Replies)
Discussion started by: bobochacha29
8 Replies
2. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
I'm trying to use a directory path to enter a new directory and sort the files there. I'm using the language C with a system call in Unix to sort the files from smallest to largest.
2. Relevant commands, code, scripts, algorithms:... (1 Reply)
Discussion started by: TedFTW
1 Replies
3. Shell Programming and Scripting
To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete some of the files inside the dir (0 Replies)
Discussion started by: shaal89
0 Replies
4. Shell Programming and Scripting
Hi ,
I am trying to write something to find the size of particular type of files in a directory & it's subdirectory and sum the size .. These types of file are found at directory level or its subdirectories level ..
#!/bin/ksh
FNAME='.pdf'
S_PATH=/abc/def/xyz
find $S_PATH -exec ls -lad... (4 Replies)
Discussion started by: Vaddadi
4 Replies
5. Solaris
Hi,
I wanted a script to find sum of files for a particular date, below is my script
ls -lrt *.req | nawk '$6 == "Aug"' | nawk '$7 == "1"'| awk '{sum = sum + $5} END {print sum}'
However, i get the error below
/usr/bin/ls: arg list too long
How do i fix that.
Many thanks before. (2 Replies)
Discussion started by: beginningDBA
2 Replies
6. Shell Programming and Scripting
How do I write a bash or ruby or perl or groovy script to print all the files in my directory tree that are one-to-two years old, the size of each file, and the sum of file sizes and then delete them?
I was using
find . -atime +365 -exec rm '{}' \;
but the problem was that I could not... (5 Replies)
Discussion started by: siegfried
5 Replies
7. Shell Programming and Scripting
Hello Friends,
When i type du -sh *.jar | sort -n under a library directory i get a result similar below output:
1M 1.jar
2.4M 2.jar
4.5M 3.jar
. .
. .
. .
1K (n-2).jar
15K (n-1).jar
77.7K n.jar
I want to sum up the size... (1 Reply)
Discussion started by: EAGL€
1 Replies
8. Shell Programming and Scripting
hi there,
I have a directory which contents I can parse dynamically. I end up with a file list. I then want to display those files sorted by date, oldest files first. I have very very little PERL experience...Would anyone know how to do that ? Thanks in advance. (8 Replies)
Discussion started by: alexf
8 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I have a requirement like below,
I want to transfer few file of size > 5 Mb from one directory to anotehr directory. Please let me know the command how can i do that
Sorry if it looks silly
Senthil (6 Replies)
Discussion started by: skcontact
6 Replies
10. Shell Programming and Scripting
I need to determine if any three files have the same file size in a specified directly?
I have got as far as listing the file sizes but where to go from here?
ls -al |sort -n -r +4 | awq '{print $5}'
Thanks in anticipation (5 Replies)
Discussion started by: oggle
5 Replies