Wednesday, April 05, 2006

A few new tips

To identify if the processor is 32 bit or 64 bit ( I guess the OS will also have to be corresponding)
use uname -i or getconf LONG_BIT

To identify processes using files or sockets (will come handy esp when you are unable to unmount disks)
fuser port/type eg fuser 21/tcp will give the process ids using ftp on your machine
fuser -km /home kills all processes accessing the file system /home in any way.
Alternatively you could also use lsof and then pipe it to grep to find the file or process you are looking for

To print real and effective UIDs and GIDs of a user use
id username

In case you get these errors for yum while attempting multiple mirrors
[Errno -1] Metadata file does not match checksum
give
yum clean metadata
and if that doesn't work then give
yum clean all
then try again

To know the exit status of the last process executed
echo $?

No comments: