clfsplit(1)

πŸ’– clfsplit β€” bestie edition πŸ’–

okay so this is clfsplit from the logtools squad, manual section 1 πŸŽ€ and it's literally the girl who takes your giant messy web logs and separates them by IP address. main character energy fr.


✨ SYNOPSIS ✨

clfsplit [--help] [-i input] -d defaultfile -f file -s spec [-f file -s spec]

yes bestie, you can stack -f file -s spec pairs as many times as your heart desires πŸ’…


🌸 DESCRIPTION 🌸

so clfsplit splits up large CLF format web logs based on IP address. that's it, that's the job. it exists so you can make separate log analysis passes for internal and external users of web pages πŸ¦‹ no cap, that's the whole reason.


πŸ‘‘ OVERVIEW πŸ‘‘

okay let's walk through it, stay with me 🫢

  • the defaultfile parameter says where data goes if it doesn't match any of the IP ranges. ngl, this could totally be /dev/null depending on your aims πŸ’€ like if you literally do not care about the leftovers.
  • the -i input parameter gives the file to take input from β€” and the default is standard input ✨
  • the -f file parameter must be given before the list of IP addresses. it's giving "order matters, bestie" πŸ™ˆ
  • the spec parameter is the IP addresses that go to the file in question πŸ“. it's of the form:
start[-end][:start[-end]]

where start and end specify the start and ends of ranges of IPs 🌈. also the CIDR notation can be used, or just a single IP address πŸ’…. and if there's a large number of IP ranges then you can hand over a file name which contains a set of IP ranges, one range per line πŸ“ iconic.


πŸ’€ EXIT STATUS πŸ’€

like, the vibe check at the end. here's what the numbers mean:

  • 0 β€” No errors πŸŽ‰ slay, we ate
  • 1 β€” Bad parameters 😭
  • 2 β€” Can't open input πŸ™ˆ
  • 3 β€” Can't open/write to output file πŸ’”
  • 4 β€” Can't open and read from spec file 🫠

πŸŽ€ AUTHOR πŸŽ€

This program, its manual page, and the Debian package were written by Russell Coker <russell@coker.com.au> 🌸


πŸ¦‹ SEE ALSO πŸ¦‹


k bye bestie, go split some logs πŸ’œ this whole thing is by Russell Coker <russell@coker.com.au>, version 0.06, and it's a clfsplit(1) moment fr fr βœ¨πŸ’–πŸŽ€