I've just spent a good few hours trying to find any clues to the problem I was getting. du command would fail with a mysterious "fts_read" error, and there didn't seem to be any good answers on the net with explanations why. I figured someday this post will be found and might save someone a lot of time. It's a lengthy post and I believe the first one on this blog to be truly "advanced" in a technical sense.
I know I've spoken about timestamps already, but I'd like to further expand the topic.
While there's a great GNU stat command in Linux systems, there's no such thing in Solaris by default, and so you usually depend on ls command with various options to look at file's creation, modification or access time.
The standard /bin/ls command in Solaris doesn't always show you the full timpestamp, usually if it's about a time too far in the past or a bit into the future – so today I'm going to show you a trick to work around it and still confirm such timestamps for any file.
I'm finally back from my holidays and thrilled to be sharing next of my Unix tips with you!
Today I'd like to talk about parsing text files in Unix shell scripts. This is one of the really popular areas of scripting, and there's a few quite typical limitations which everyone comes across.
Reading text files in Unix shell
If we agree that by "reading a text file" we assume a procedure of going through all the lines found in a clear text file with a view to somehow process the data, then cat command would be the simplest demonstration of such procedure:
redhat$ cat /etc/redhat-release Red Hat Enterprise Linux Client release 5 (Tikanga)
Showing your processes in a hierarchical list is very useful for confirming the relationship between every process running on your system. Today I'd like to show you how you can get tree-like processes lists using various commands.
This is a very brief introduction into navigating the device paths in Solaris. I'm using a Solaris 10 installed on Sun v490 for all the commands shown below.
Device files in Solaris
Even though all the block and character special device files are traditionally found under /dev directory, if you look closer at your Solaris 10 setup you will notice that they're not the device files themselves, but instead are just symbolic links to device files under /devices directory.
Solaris uses /devices directory for representing all the physical hierarchy of installed devices and buses found on your hardware system.