Home » Unix


Unix: Find files greater than date

For the latter part of the week I’ve been running some tests against Neo4j which generate a bunch of log files and I wanted to filter those files based on the time they were created to do some further analysis. This is an example of what the directory listing looks like: $ ls -alh foo/database-agent-* -rw-r--r-- 1 markneedham wheel 2.5K ...

Read More »

Unix: Find all text below string in a file

I recently wanted to parse some text out of a bunch of files so that I could do some sentiment analysis on it. Luckily the text I want is at the end of the file and doesn’t have anything after it but there is text before it that I want to get rid. The files look like this: # text ...

Read More »

Unix: Split string using separator

I recently found myself needing to iterate over a bunch of ‘/’ separated strings on the command line and extract just the text after the last ‘/’. e.g. an example of one of the strings A/B/C I wanted to write some code that could split on ‘/’ and then pick the 3rd item in the resulting collection. One way of ...

Read More »

Application Server as a Service in Unix

Running the Application Server as a service or daemon on the machine ensures that service restart automatically when the machine reboots and also provides the capability to start the server with a UNIX shell. In this post, we will create Weblogic  server as a service making it to start at machine reboot in few steps as follows: Step 1: Create ...

Read More »