Monthly Archives: May 2024

Use sed to replace last character after matching a line

If you are a coder like me we tend to discover after we have made a script that we need to change something on multiple lines. Recently I have a script whereby added a “log_message” function which would echo a … Continue reading

Posted in Command Line FU | Tagged , , | Leave a comment

Viewing contents of an open filehandle on a deleted file

There are times when you may unintentionally delete a file which is being written to. When this occurs it will leave an Open Filehandle. In Linux open filehandles may be viewed via the ‘lsof’ command. # lsof +L1 In the … Continue reading

Posted in Command Line FU, Internals, Linux | Leave a comment