Here's a C shell inline script to remove zero length and core files. This particular script removes these files from the esofthub directory. Here's an example.
#csh
# foreach zero_core(/home/esofthub/*)
? if (-z $zero_core || `basename $zero_core` == "core") then
? rm $zero_core
? endif
? end
Just find zero length files (per request)
#csh
# foreach zero_core(/home/esofthub/*)
? if (-z $zero_core) then
? rm $zero_core
? endif
? end
This blog covers Unix system administration HOWTO tips for using inline for loops, find command, Unix scripting, configuration, SQL, various Unix-based tools, and command line interface syntax. The Unix OS supports tasks such as running hardware, device drivers, peripherals and third party applications. Share tips/comments. Read the comments. But most importantly: Read Disclaimer - Read Disclaimer.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment