Real time updating of files

I installed application called terminator, which allows me to open multiple terminals.

I want to run git commands at the left terminal and want to see at right terminal real time updates of file system.

Every time I reinvent it I write it a little differently than I did before, and now I want to update it for Perl’s new features, mainly its subroutine signatures.

One day I had a small task to prune a directory tree and I wanted to look at the largest files in it.

For example, if you are regularly dynamically creating a new graph image, you need to make sure a half saved version of the image file is not served to a browser.

If this happens, the browser will display a corrupt image, or nothing at all.

Next, when everything is saved, rename the file to the live file name.

This time, I use the three-argument pipe-open instead of the two-argument form I’d used earlier. My concept is that the on-screen list will update with the largest files so far.

I take each line of output, split it into its size and filename, and add them to the list. It knows the screen size already: Once I have the sorted list, I have to draw it to the screen. I need to erase what’s already there so a shorter filename doesn’t leave parts of a longer filename it might replace.

I like tools that will perform more than one task, Notepad is a great notepad replacement and has a Document Monitor plugin (installs with standard msi) that works great.

It also is portable so you can have it on a thumb drive for use anywhere.

Leave a Reply