AboutWelcome to Free Software Daily (FSD). FSD is a hub for news and articles by and for the free and open source community. FSD is a community driven site where members of the community submit and vote for the stories that they think are important and interesting to them. Click the "About" link to read more...
Today I'm going to show you how to use the head and tail commands to view portions of text files. There are, of course, other commands that can be used to view text files. The cat command can be useful for viewing small text files while more and less can be good for larger files. But what if you're only interested in just the beginning or the end of a file? That's where head and tail come in.
MultiTail lets you view one or multiple files like the original tail program. The difference is that it creates multiple windows on your console (with ncurses). It can also monitor wildcards: if another file matching the wildcard has a more recent modification date, it will automatically switch to that file. That way you can, for example, monitor a complete directory of files.
MultiTail is an improvement on the well-known program tail, which allows you to view multiple files at the same time in the same window. It colorizes them...
Multitail improves on the well-known and useful program tail, adding colors and multiple-file monitoring. Juliet Kemp offers some great tips on using this excellent file-monitoring utility.
MultiTail lets you view one or multiple files like the original tail program. The difference is that it creates multiple windows on your console (with ncurses). It can also monitor wildcards: if another file matching the wildcard has a more recent modification date, it will automatically switch to that file. That way you can, for example, monitor a complete directory of files.
Now that I am done with the implementation of RHE Cluster with GFS2, I now need to setup monitoring. As you all know, monitoring is a vital part of any environment. Even though we have a cluster of nodes setup, we still need to be aware of what is happening. I created two new commands. The first command is to emulate clustat, but through python and SNMP.
One of the things I like about Linux is the command line. I have used nautilus, konqueror, and thunar to manage files in Linux and these file managers are great for what they do. But there are times when one simply wants to find a file when working on the command line without having to open a GUI application.
One of the things I like about Linux is the command line. I have used nautilus, gnome-commander, konqueror, kommander, dolphin and thunar to manage files in Linux and these file managers are great for what they do. But there are times when one simply wants to find a file when working on the command line without having to open a GUI application.
Reading files is no big deal with bash: you just redirect the input to the script or pipe the output of another command into the script, or you could do it inside the script if the file names are pre-determined. You could also use process substitution to pass in the open files (command pipelines actually) from the command line.