ZeroCold Posted March 14, 2010 Report Posted March 14, 2010 Interesting UNIX CommandsEver since renting a UNIX handbook a while back ive discovered lots of the more complex operations and commands of UNIX, besides the mundane, and ordinary asks of running an maintaining an eggdrop. I therefore went through my UNIXHandbook picking out some of the less mentioned, useful comands, and here they are: mailx - This program will send an email to someone just like that. The syntaxis 'mailx user@host' you then enter your message.mesg - This command is used to disable or enable the ability of users beingable to 'write' to you.uname - This basically returns the version of UNIX the box is running. There are various switches for this command.wall - Sends a public message to ever user on the box, as if you had 'writen'to each and ever user. Good for admins.banner - This reutrns an ASCII banner for a word or letter you specify. So 'banner shell' would outpub shell in big ASCIIuncompress - This decompresses .Z files. For example 'uncompress shell.Z' would output a file 'shell'tail - This shows the last 10 lines of a file. The -f option can also be used to 'follow' a file as additions are made.more - allows you to scroll a file. This is most often used when readingMOTDs, by 'more /etc/motd'ln - This is used to create links. For instance I could make shell-tests.txtlink to a file called tests by 'ln -s shell-tests.txt tests' grep - This command is the equivilent of find. I use it a lot, when doingtasks and adding the pipe symbol. Like 'ps aux | grep -c eggdrop' Thisbasically takes ps aux, and searches it for the amount of times eggdrop ismentioned (hence -c for count)crypt - This is used to encrypt text with a password. Simple encryption, buteasy to use, if you need to encrypt somthin.chown - This changes ownership of files or directories to a group or user. Very useful for administration tasks. cat - This is the equivilent of type in DOS. All it does is prints out (on your screen) the contents of a file.su - This is usually associated with Super User'ing to root, however itcan also be used to login with a different login name. Use su <username>.It will then prompt you for the pass of that user.sleep - This command is like pause, however you need to specify a time in seconds. This is usually used in scripts.ruptime - This neat command lists all the boxes on the LAN, their uptime, status, load averages and amount of users.nohup - This command is a simple equivilent of screen. It basically keeps aprocess alive even when you're logged out.man - This stands for manual, and covers most topics. To use it try 'man command.name' it should give you help groups - Returns with the groups that you're a member of.env - This command sets the environment of your shell. For instance you canchange your home dir with 'env HOME=/home/blah'at - This can be used to schedule things. Use 'at 10am' <enter> and thenenter the command you'd like it to perform at that time.stty - This has quite a few uses, however I use it for one thing. Ever hadyour backspace key produce ^H's? try "stty erase backspace"command;command - Do you want to put multiple commands in one line? Use ;to separate them and they'll be performed one after eachother. For instancels;uptime;cp blah review;./eggdrop u -m Quote