Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Question about a Tail -f baash command
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Question about a Tail -f baash command

GM2015GM2015 Member
edited August 2015 in Help

Tail -f file.name lists the last 10 entries in the file specified as far as I know. Is it possible to exclude certain lines from being displayed?

I'm watching my site's visit log and most of my logs are unfortunately my ips. How could I stop tail from showing my ips?

I've got 5 IP-s I want to block:

my home ip
my server ipv6
my window's server's ipv6
my window's server's ipv4
my amazon server's ipv4

My server's IP show up I assume when wordpress is doing its pinging and caching and so on.

Windows and amazon servers are connected via owncloud desktop clients, so I see them making connections in tail -f.

Thanks!

Comments

  • What about:

    tail -f AccessLog | grep -v '1.2.3.4|2.3.4.5|3.4.5.6'

    Thanked by 2netomx GM2015
  • What markTurner said, use grep.

    Thanked by 1GM2015
  • Doesn't seem to work on Ubuntu 14.04

    tail -f /path/to/wordpress.access.log | grep -v '1.2.3.4|5.6.7.8|1234:5678:500:1234:f33f:abcd:745:1234|1234:1234:1:12::12:1234|7.8.9.0'

  • Stupid Cloudflare has removed my slashes

    It should say:

    '1.2.3.4BACKSLASH|2.3.4.5BACKSLASH|3.4.5.6'

    The word backslash change to the symbol \

    Thanked by 1GM2015
  • Damn man I'm really pissed off at you, it actually worked :D.
    And I agree on cloudflare, it's an annoyance and don't think it solves anything on lowendsqldump.

    MarkTurner said: Stupid Cloudflare has removed my slashes It should say: '1.2.3.4BACKSLASH|2.3.4.5BACKSLASH|3.4.5.6' The word backslash change to the symbol \

    Thanked by 2netomx MarkTurner
  • MarkTurner said: Stupid Cloudflare has removed my slashes

    It should say:

    '1.2.3.4BACKSLASH|2.3.4.5BACKSLASH|3.4.5.6'

    The word backslash change to the symbol \

    You seems to know nothing about what's happen after you click "Post Comment". So shy how much members called "Provider" here can only put advertisements in signatures; but when it comes to some knowledge - just nothing. Why do you think that's not lowendtalk CMS (Vanilla)?

    Did you try to put it in "code" tags?

    tail -f AccessLog | grep -v '1.2.3.4\|2.3.4.5\|3.4.5.6'

    Thanked by 1GM2015
  • Profforg said: when it comes to some knowledge - just nothing

    LOL

    Thanked by 3GM2015 lazyt TheCTS
  • The issue has been solved, thanks.

    @Profforg said:
    tail -f AccessLog | grep -v '1.2.3.4\|2.3.4.5\|3.4.5.6'

Sign In or Register to comment.