10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have a main folder 'home'. Lets say there is a folder 'bin' under 'home'. I want to check the list of files under subdirectories present under the /bin directory created in the last 24 hours.
I am using the following find command under home/bin directory:
find . -mtime -1 -print
... (3 Replies)
Discussion started by: DJose
3 Replies
2. Shell Programming and Scripting
hi,
i have a requirement to delete all the files from all the directories except some specific directories like archive and log.
for example:
there are following directories such as
A B C D Archive E Log F
which contains some sub directories and files. The requirement is to delete all the... (7 Replies)
Discussion started by: Little
7 Replies
3. Shell Programming and Scripting
Hello Friends,
I have directory called /tmp. which stores the log files.
Whenever it becomes full, i want to delete half of files from all log files.
even after deleting the files, if space is more than 90% then it should delete rest of half files.
While deleting files, older files... (7 Replies)
Discussion started by: Nakul_sh
7 Replies
4. Shell Programming and Scripting
Hi All,
I've created 2 files
touch -t 201309101234 aa10
touch -t 201309111234 aa11
Exact 60 days before from today date is SEPT 12th . As per the following command as i gave +60 means the files which were created before sept12th should be deleted
find /etc/logs/*aa* -type f -atime +60... (5 Replies)
Discussion started by: smile689
5 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I want to delete all the log files that was created on year 2008. My command is not working. Any idea?
find . -name '*.log' -mtime 1460 -exec ls -lt {} \;
Thank you. (2 Replies)
Discussion started by: samnyc
2 Replies
6. Shell Programming and Scripting
Hello All,
Can someone please help me out in creating the find command to search and delete files older than 1 days at a desired location.
Thanks in advance for your help. (3 Replies)
Discussion started by: Pandee
3 Replies
7. Shell Programming and Scripting
My code to "Delete empty files from a directory entered in command promt"
#/bin/sh
echo "Enter directory"
read gh
for file in `ls $gh`
do
# to get the size of file
a=$( ls -l file | awk ' {print $7} ');
echo $a
if
then
echo "removing file "
rm file
fi
done (6 Replies)
Discussion started by: adirajup
6 Replies
8. UNIX for Dummies Questions & Answers
I did this:
ls -lrRt | grep ^* | cksum *
but it is showing cksum of sub-directories.
Thanks You
Please use code tags when posting data and code samples, thank you. (3 Replies)
Discussion started by: ezee
3 Replies
9. Shell Programming and Scripting
Hi All,
The following find command lists the files which are 45 minutes older. But it searches for the sub directories also.
$ find . -type f -mmin +45 -print
./hello.txt
./test/hi.txt
./temp/now.txt
ls
hello.txt test temp
How can i modify the find command in such way that it finds... (4 Replies)
Discussion started by: Tuxidow
4 Replies
10. Solaris
Hi Gurus
I am facing a problem, there is a folder called /a where there are lots of files which are occupying space anything between 30 GB to 100 GB as I am not able to check the space occupied by that folder through "du -sh /a" command as I don't see any output after more than 1 hour of... (4 Replies)
Discussion started by: amity
4 Replies