Essential Linux System Administration – Tips-5


Q. How do I Add,Edit or delete a contab?

A. At the command prompt type

crontab   –e

Q. How can I get the number of files  9inodes 0in all the directories in the current directory?

A. Use this find command

find   .   –xdev   -type   d   –exec   /bin/echo    –n    { }    \ ;     -exec    sh    –c    “Is { } |wc    -l”    \ ;

Q. How can I check the processes  of two or more users?

A. Just use egrep

ps    –aux   |   egrep    ‘ |’

Q.I have a command aliased with switches. How do I unalias it quickly?

A. Just proceed the command with a backslash ‘ / ‘

For example,if you have an alias:

alias   pico=’pico    –w    –z’



Q. How can I kill a user and their processes?

A.This will work nicely

su   –     -c    ‘ kill    -9    -1 ‘

Q. How do a split up a file so that it will fit on floppy?

A. Use split:

split    –b    1400000

To reassemble use cat:

cat     x*    >

Q. How can I turn my number lock key on at bootup?

A. Use setleds


# Use the setleds program,for example (in /etc /rc.local

#or one of the /etc /rc.d /* files):

For  t   in   1   2    3    4    5    6    7   8


setleds    +num < /dev /tty$t  > /dev/null


#Alternatively,patch your kernel. You need to arrange

#for  kbd_DEFLEDS to be defined to (1 << vc_NUMLOCK )

#when compiling drivers /char/keyboard.c.


——————– Thanks


About Author


Leave A Reply

Powered by