Nullify a file in unix




















Quinn was one of the original co-founders of Tech-Recipes. View more articles by Quinn McHenry. The Conversation Follow the reactions below and share your own thoughts. Leave a Reply Click here to cancel reply. Today's Posts. Quick Links. Search Forums. Show Threads. Show Posts. Shell Programming and Scripting. Nullifying a log file. Joseph Antoine. Registered User. Join Date: Feb Hi, I have a Weblogic server running in Solaris box which is writing an out file 'server. Can anyone mention what is the probem here and why im not able to make it to 0 bytes.

Join Date: Jan Join Date: Apr It may the problem of access permission. TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! If you like what you are reading, please consider buying us a coffee or 2 as a token of appreciation.

We are thankful for your never ending support. There should be a way but we have to do a little research about this before we can give you a solution. Ho to do this? You would need to do this via a cron job. You would write a script, save it somewhere, and then trigger it via cron.

The script would need to handle the logic of parsing the file into lines, parse the date from each line, and then discard the lines that have a date more than 30 days old. Are the other methods working the same way?

But there are other methods works same way as show in this article, I think you should give a try and see.. When I opened this link I was expecting ways to actually get rid of the file contents on the disk.

All of these methods only unlink the disk space from the file, leaving the contents on the drive. There are other methods for completely removing file content on the disk such as shred command plus a few others.

We will create a how-to guide on this topic soon. Can we reflect files size back to file system. What are possible ways to clear to do this 4. If these files are not recovered in file system, so possible they are still somewhere, S0 can we recover these files from there.

But it also has its downside as file size is comes up as free usable size in disk. TO identify deleted files we can we can easily able to see them through lsof command with below options. With above command, we can see deleted files for particular mount point.



0コメント

  • 1000 / 1000