Alternatives to watch

Discussion in 'all things UNIX' started by Searching_ _ _, Jan 31, 2011.

Thread Status:
Not open for further replies.
  1. Searching_ _ _

    Searching_ _ _ Registered Member

    Joined:
    Jan 2, 2008
    Posts:
    1,988
    Location:
    iAnywhere
    Watch is a little limited in function. Is there any other ways to monitor file or directory changes and write the changes to a log or txt file?
    I can't scroll to see all of the files monitored in the directory when it exceeds the screen length of terminal.

    Code:
    watch -n 10 -d ls -l /directory/file
     
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,696
  3. katio

    katio Guest

    |less or >file?
     
  4. Searching_ _ _

    Searching_ _ _ Registered Member

    Joined:
    Jan 2, 2008
    Posts:
    1,988
    Location:
    iAnywhere
    I gnu you were going to post a link to Dedoimedo. :D
    So I just "apt-get install audit/auditd"?
    Is auditd pre-loaded in Ubuntu 10.10? I'm spinning something else at the moment.

    Is their any way to export to spread sheet for OO?
    A sample pic of aureport in action would be cool.

    In addition to aureport I have found another tool, SNARE.
    SNARE Documentation -Intersect Alliance [cue]Short Skirt/ Long Jacket[/cue]
    What are your thoughts about it?
    You have to load a kernel module, is a reboot required? Can I just log out?
     
  5. Searching_ _ _

    Searching_ _ _ Registered Member

    Joined:
    Jan 2, 2008
    Posts:
    1,988
    Location:
    iAnywhere
    So using watch <switches> >/directory/file.txt would have a growing .txt file until ctrl+c.
    I'll have to give that a try to see how it looks compared to terminal.

    Thanks
     
  6. katio

    katio Guest

    You should be able to load it with
    sudo modprobe name_of_snare_module
     
  7. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    8,696
    In Ubuntu, audit is already installed and running. Just use it.
    And you can parse the data any which way you want.
    Mrk
     
  8. Searching_ _ _

    Searching_ _ _ Registered Member

    Joined:
    Jan 2, 2008
    Posts:
    1,988
    Location:
    iAnywhere
    Output of watch in .txt is not good.
    Everything in the change ran together with cursor representations mixed in.

    Maybe when I'm spinning Ubuntu I'll play around with audit more since I don't have to install it.
    I'll try and install in my current spinner maybe, to see.
     
  9. L815

    L815 Guest

    How about:

    Code:
    tail -f file.txt
     
Thread Status:
Not open for further replies.