SysAdmin Blog, TechTips and Reviews

Unix Linux – Solaris Redhat Ubuntu – Open Source



Archives Posts

from DUSK…

August 7th, 2007 by elizar

We UNIX SysAds have many many tools that can help us administer our servers. What’s great about UNIX is that you don’t have to learn the complicated commands to do what’s need to be done.


There is a saying in the UNIX world that a complex command is just a few commands used altogether. We usually apply pipes on these stuff.

Let’s take DUSK for example… or it can really be DUCKS depending on what version of DU you use.

DUSK is what I use very often every time I want to know the disk usage of the current file systems and the sub directories under that.

The command,

du -sk * | sort -n | more

does exactly that. And here’s the output when executed my home directory.

bash-2.05# du -sk * | sort -rn | more
4409 nrpe
4263 tmp
3399 xilinx
1048 dl4.files
465 unixstuff
244 scripts
30 hosts
7 doy
6 list.tqs.032206
4 LICENSE.TXT
2 help
1 netapp
1 hp84k.NIS

As you can see, it listed all the size of the files and the directories. This is a useful command specially if you’re looking for the disk space hog on you filesystem.


But why use such long command when you can use ‘dusk’ ? I don’t know about you but ‘du -sk * | sort -rn | more’ is a mouthful than ‘dusk’ right?

Here’s what you do: Simply create and alias for that command and assigned it to ‘dusk’ and you’re done.

bash:

# alias dusk=’du -sk * | sort -rn | more’

csh

% set dusk= du -sk * | sort -rn | more

Try it. It will save you tones of typing errors! ;)

Filed under Linux, Tips, Unix having No Comments »

Archives Posts

Most Common UNIX Find Command

August 5th, 2007 by elizar

The find command is the most useful command on a UNIX box. System administrators use this powerful utility frequently.

Presented here, ladies and gentlemen, are the most commonly used ‘find’ options.

(Let’s add more as time goes on, alright?)

Find a file or directory
# find . -name TEMP -print
or
# find . -name TEMP -exec echo {} \;

Find core files in this directory tree and remove them
# find . -name “core” -exec rm -f {} \;

Find junk directories and remove their contents recursively
# find . -name “junk” -exec rm -rf {} \;

Read the rest of this entry »

Filed under Solaris, Tips, Unix having No Comments »

Archives Posts

Popular Unix Flavors

August 4th, 2007 by elizar

Unlike Windows, you know that it is from Microsoft and is only one. Unix, however is not a single operating system. It has many flavors (aka. variants, types, or implementations). Although based on a core set of Unix commands, different flavors have their own unique commands and features, and designed to work with different types of hardware.

The following are some of the well-known Unix flavors. By no means this is complete. No one knows exactly how many variants UNIX has, but is surely in the hundreds, including the obsolete ones.

AIX by IBM
BSD/OS (BSDi)
by Wind River
CLIX by Intergraph Corp.
Debian GNU/Linux by Software in the Public Interest, Inc.
Tru64 Unix (formerly Digital Unix) by Compaq Computer Corp.
DYNIX/ptx by IBM (formerly by Sequent Computer Systems)
Esix Unix Esix Systems
FreeBSD by FreeBSD Group
GNU Herd by GNU Organization
HAL SPARC64/OS by HAL Computer Systems, Inc.
HP-UX by Hewlett-Packard Company
Irix by Silicon Graphics, Inc.
Linux by several groups several
LynxOS by Lynx Real-Time Systems, Inc.
MacOS X Server by Apple Computer, Inc.
NetBSD by NetBSD Group
NonStop-UX by Compaq Computer Corporation
OpenBSD by OpenBSD Group
OpenLinux by Caldera Systems, Inc.
Openstep by Apple Computer, Inc.
Red Hat Linux by Red Hat Software, Inc.
Reliant Unix by Siemens AG
SCO Unix by The Santa Cruz Operation Inc.
Solaris by Sun Microsystems
SuSE by S.u.S.E., Inc.
UNICOS by Silicon Graphics, Inc.
UTS by UTS Global, LLC

Filed under Unix having No Comments »

Next Entries »