Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 22
Hello good day to all, im new here on these forum, i would like to ask help on commands, i would like to view a log file located at /var/log/audit.d ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! xMoDx's Avatar
    Join Date
    Feb 2007
    Location
    localhost
    Posts
    41

    need help on command [logs]


    Hello good day to all,

    im new here on these forum, i would like to ask help on commands, i would like to view a log file located at /var/log/audit.d what command i need to let me execute or view the log file?

    thanks in advance

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    I'm not positive, but I think thats a directory.
    try this
    ls /var/log/audit.d
    If that doesn't work then try
    more /var/log/audit.d
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  3. #3
    Just Joined! xMoDx's Avatar
    Join Date
    Feb 2007
    Location
    localhost
    Posts
    41
    Quote Originally Posted by MikeTbob
    I'm not positive, but I think thats a directory.
    try this
    ls /var/log/audit.d
    If that doesn't work then try
    more /var/log/audit.d

    thanks, it show me a lot files named save.0 to save.999 i would like to check or let say read file save.999? what would be that command? and or is it possible?

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Quote Originally Posted by xMoDx
    it show me a lot files named save.0 to save.999 i would like to check or let say read file save.999? what would be that command? and or is it possible?
    Code:
    less /var/log/audit.d/save.999




    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Just Joined! xMoDx's Avatar
    Join Date
    Feb 2007
    Location
    localhost
    Posts
    41
    Quote Originally Posted by devils_casper
    Code:
    less /var/log/audit.d/save.999




    Casper

    thanks it worked.. =) by the way what if i would like to search for a specific file like log files of Saturday between 2 to 3am server time?

  6. #6
    Just Joined! xMoDx's Avatar
    Join Date
    Feb 2007
    Location
    localhost
    Posts
    41
    what if i would like to search for a specific file like log files of Saturday between 2 to 3am server time?

  7. #7
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    It all depends on your logs formatting. You can use "grep" to search through one or multiple files. For example,

    $ grep 12-02-2007 /var/log/audit.d/save.*

    This will show you lines corresponding with 12-02-2007 in all save.0 to save.999 files in your /var/log/audit.d folder. If you have a lot of results, pipe the output to less:

    $ grep 12-02-2007 /var/log/audit.d/save.* | less

    Oh, and by the way, using tail to view log files could be useful. It will show you the last lines of your log files.

    Hope this helps.

  8. #8
    Just Joined! xMoDx's Avatar
    Join Date
    Feb 2007
    Location
    localhost
    Posts
    41
    Quote Originally Posted by stukov
    It all depends on your logs formatting. You can use "grep" to search through one or multiple files. For example,

    $ grep 12-02-2007 /var/log/audit.d/save.*

    This will show you lines corresponding with 12-02-2007 in all save.0 to save.999 files in your /var/log/audit.d folder. If you have a lot of results, pipe the output to less:

    $ grep 12-02-2007 /var/log/audit.d/save.* | less

    Oh, and by the way, using tail to view log files could be useful. It will show you the last lines of your log files.

    Hope this helps.

    Thanks

  9. #9
    Just Joined! stukov's Avatar
    Join Date
    Feb 2007
    Posts
    44
    ... and since you are asking to know more commands, try that one out: "man". That one will surely proove to be useful to you

    Try this if you are curious:

    $ man man

  10. #10
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    check www.linuxcommand.org too.






    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •