Category Archives: COTD

COTD: fuser - identify processes using files or sockets

Today’s Command Of The Day is the “fuser” command.
Have you ever wanted to unmounted an NFS share, or local filesystem and couldn’t because it was in use?  The same applies to CD/DVD’s, PenDrives, etc.  Generally, you receive a message similar to the following:
# umount /dev/sdc1
umount: /media/disk: device is busy.
The fuser has many options.  The ones [...]

COTD: tee - read from standard input and write to standard output and file

Today’s COTD is the “tee” command.
Have you ever wanted to redirect the output of a script or program to a file, but be able to view it right away? Without putting the file in the background, and then tailing the file?
The tee command allows you to do just that.
Here is how we could use [...]

COTD: touch - change file timestamps

Todays COTD (Command Of The Day) is the “touch” command.
The touch command is used to update the access and modification times of files.  However, I see it more commonly used to create a new file.  There are many times when you want to create a new file, but not actually put anything in it.  For [...]

COTD: netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships

The COTD for today is the netstat command.
The netstat command prints network connections, routing tables, interface statistics,  and a bunch of other goodies that are helpful in managing any UNIX box.
One of the common uses of netstat is to show the systems routing table.  This is done by the “netstat -r” command.
$ netstat -nr
Kernel IP [...]

COTD - Command Of The Day

Welcome to COTD.  Each day I am going to pick a UNIX command and spend a little time sharing a little bit about that command.  I am going to call this “COTD” for “Command Of The Day”.
I may not get into every possible use of the selected command, but I am hoping to raise some [...]

COTD: wc - print newline, word, and byte counts for each file

The wc command is very useful.  It’s a simple little command, but I use it all the time.  The wc command basically counts the number of characters, number lines, or the number of words.  Some version can also show the length of the longest line.
Using it is simple.  Pass the output of another command to [...]