Wednesday, September 03, 2008

Unix Important

1. How do you delete 3 days old log files?

Usage: find /location -name "*.log" -mtime +3 -exec rm -rf{} \;

Example : find ./ -name "*.req" -mtime +4 -exec ls -ltr {} \;

2. Display latest 20 largest files/directories in current directory?

Solution: du -ka sort -n tail -20

3. How do you display/remove Specifice Month files in Unix?

Solution: rm `ls -l grep Jun awk '{print $9}'`

4. How do you find the files which contains a specific Word?
Solution : find /home/ganesh \( -type f \) -exec grep -l test {} \;

No comments:

Integrate Oracle ADF with Oracle E-Business Sutie 12.2 ASCP Instance

Integrate Oracle ADF with Oracle E-Business Suite 12.2 ASCP Instance for  SPWA - Supply Planning Work Area What is  Oracle ADF? Orac...