LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   tmpwatch a dangerous button to push for a newbie :0 (https://www.linuxquestions.org/questions/linux-newbie-8/tmpwatch-a-dangerous-button-to-push-for-a-newbie-0-a-4175427774/)

j0ax 09-18-2012 03:18 AM

tmpwatch a dangerous button to push for a newbie :0
 
Long story short, I notice this rpm tmpwatch-2.9.7-1.1.el5.5.x86_64.rpm
in a directory full of rpm's. Looks insteresting so I type

tmpwatch

It complains that it wants a directory and a time (in hours). Fine I can accomodate that:

tmpwatch . 0.1

My hypothesis is that it will temporarily monitor the directory and report on any reads, writes or failed attempts to open/find a file. I could just look that the man page, but hey, I am the man and I do as I please.

I get the curser back. Hmm not much out put. Nothing like the old fliemonNT kind of output I was expecting.

Then I do a #[root home/RPMS] ls -al

This is sort of a dramatic moment. Did I start punching my monitor?
Nope.

Did I call the sysadmin over and say "hey man i think there is something wrong with your file system?"
No way. That guys a looks like he is about to go off on someone all the time.

Did I call Lisa the intern over? Hey Lisa check out what I am doing. Just type ls there... LISA! what did you do? I said ls not rm -Rf *, We better call the admin over. No of course not. this is not my style. I am ashamed I even imagined it.

When I was a kid I used to throw toy electric cars against the wall so I could get a look at all their parts. It was pretty fun. As an adult I find it relaxing to hack around on the system and see what happens and then make a few notes things that seem cool.

In the end no worries. The bank is too big to fail and my playing around didn't hurt any body. The losses are de minimis, and non-material. Hmm there should be a bonus in this for me.

Nope, I will I just delete the VM. This is my home system and I am the only lunatic on the system. So it's all good. It has been a great intro to tmpwatch.

By the way, whenever I find a command that I think is useful
I type the word useful and it gets appended to my list of cool commands. In my .bashrc I define useful like this:

alias useful='fc -ln -1 | xargs echo >> ~/useful.txt'

That tmpwatch command is in my useful list. I'll use it to purge some old log files and some old load files that tend to collect on my server.[/FONT]

Habitual 09-18-2012 07:09 AM

You da man tmpwatch!

unSpawn 09-18-2012 08:15 AM

Thanks for sharing but the post would have been better off in your personal web log IMHO.


All times are GMT -5. The time now is 11:20 PM.