Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You have at least three possibilities:
1) use the find command with -size and -exec.
2) use the stat command with -c%s and if the size is greater than a certain value delete the file
3) add a rule to logrotate and specify the size option.
This will be in Solaris box...by any chance do you have a sample one that I can modify?
Thanks
Quote:
Originally Posted by colucix
You have at least three possibilities:
1) use the find command with -size and -exec.
2) use the stat command with -c%s and if the size is greater than a certain value delete the file
3) add a rule to logrotate and specify the size option.
Note than on Solaris the -size option accepts either a number of 512-bytes blocks or the size in bytes (using the c suffix as in my example). The echo statement is just for testing purpose (remove it if you want to actually delete the file).
Note than on Solaris the -size option accepts either a number of 512-bytes blocks or the size in bytes (using the c suffix as in my example). The echo statement is just for testing purpose (remove it if you want to actually delete the file).
tried this script...it runs but something not working. Could you explain what xaa and x?? supposed to be? I modified few times but not getting results. Thanks again.
Quote:
Originally Posted by colucix
Well.. in that case I'd use split and a simple script like this:
Well, xaa, xab, xac... are the default name of the pieces created by the split command. Go through the man page of these command is something is not clear or if some behaviour is different. I have tested it on a Solaris Sparc 5.8 and it works.
Anyway, please post the exact commands you tried and copy/paste the error messages. If you simply tell "something don't work".... you tell me nothing!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.