Showing posts with label general. Show all posts
Showing posts with label general. Show all posts

18 January 2010

Symbolic links

namei can be used to trace the endpoint of a cascaded symbolic link

Eg.,

$ namei /dev/cdrw
f: /dev/cdrw
 d /
 d dev
 l cdrw -> scd0
   b scd0
$

29 May 2008

Soft limit & Hard limit

Most of us encountered to increase the limit of file descriptors while installing a high end 3pp(party product).In doing so we will encounter with two different kinds of limits i.e.soft vs hard.

Hard limits are a kernel-configurable item and users can't exceed them. Soft limits are the user defaults and users can change that using the ulimit command.

Basically, soft limits can be changed to anything up to the hard limit. Soft limits are warning barrier. When a user reaches the soft limit they will get an warning message but are still allowed to use more space up to the hard limit.

Since its a kernel tunable we have to define the value in /etc/system and /etc/sysctl.conf for Pre-Solaris 10 and Linux respectively.

E.g.,

To set a hard limit of 4096 and soft limit of 1024 in Solaris 8.

set rlim_fd_max=4096 [Refers Hard limit]
set rlim_fd_cur=1024 [Refers Soft limit]


To raise the allowed limit in Linux based distributions update either /etc/limits.conf or /etc/security/limits.conf

07 March 2008

Relative vs. Absolute Pathnames

Commands can be given file name arguments in two ways.

If you are in the same directory as the file (i.e., the file is in the current directory), then you can just enter the file name on its own (e.g., cp my_file new_file). Otherwise, you can enter the full path name, like cp /home/john/my_file /home/jack/new_file.

Very often administrators use the notation ./my_file to be clear about the distinction, for instance, cp ./my_file ./new_file. The leading ./ makes it clear that both files are relative to the current directory.

File names not starting with a / are called relative path names, and otherwise, absolute path names.