- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cron job
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2011 04:05 AM
тАО03-21-2011 04:05 AM
cron job
I have a file filled with constantly so i want doing job via cron to be empty as possible as.
please, help me
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2011 05:15 AM
тАО03-21-2011 05:15 AM
Re: cron job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2011 05:45 AM
тАО03-21-2011 05:45 AM
Re: cron job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2011 08:50 AM
тАО03-21-2011 08:50 AM
Re: cron job
If information dump is useless you can replace that file by a symbolic link that aims to /dev/null (a black hole file), in this way the file size always will be null.
First step is stop the process that fill your_file.
Then go at your_file location
Remove or rename your_file
Replace your_file by a symbolic link:
#ln -s /dev/null you_file
#ls -l your_file
lrwxr-xr-x 1 root sys 9 Mar 21 17:12 your_file -> /dev/null
Restart the proccess again
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2011 09:23 AM
тАО03-21-2011 09:23 AM
Re: cron job
I create a new device file, just like /dev/null (using mknod), and name it something else, like "bitbucket". And then, I make a symbolic link to it just like Jose said.
The reason is that if root ever does a "chmod" on a set of files which happen to include the link to /dev/null, it will change the permissions to /dev/null as well, following the symbolic link. The risk here is that the "w" flag will be changed to being inaccessible, by root, group, or everyone, breaking lots of code, network printing functionality (which needs write access to /dev/null), etc.
And yes, I found this out the hard way. :-)