Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Interesting Unix Commands


Interesting Unix Commands

By ghostghost | 6671 Reads |
0     0

Interesting UNIX Commands

(yes, i know some of these are kinda out of date but i wrote them down back when i first started playing with linux. Pluss i like the way it looks doing stuff from the terminal so most of these can be done from the GUI but i like doing it thisway.)

Ever 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 UNIX Handbook 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 syntax is 'mailx user@host' you then enter your message.

mesg - This command is used to disable or enable the ability of users being able 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 ASCII

uncompress - 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 reading MOTDs, by 'more /etc/motd'

ln - This is used to create links. For instance I could make shell-tests.txt link 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 doing tasks and adding the pipe symbol. Like 'ps aux | grep -c eggdrop' This basically takes ps aux, and searches it for the amount of times eggdrop is mentioned (hence -c for count)

crypt - This is used to encrypt text with a password. Simple encryption, but easy 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 it can also be used to login with a different login name. Use su . 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 a process 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 can change your home dir with 'env HOME=/home/blah'

at - This can be used to schedule things. Use 'at 10am' and then enter 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 had your 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 instance ls;uptime;cp blah review;./eggdrop u -m

				-z3r0phr34k (Stan)

Comments
ghost's avatar
ghost 18 years ago

Really nice article. Great for reference.

nanoymaster's avatar
nanoymaster 18 years ago

love the article 10/10

ghost's avatar
ghost 18 years ago

meh, pretty good article i guess kinda pointless imo, people should learn to look stuff up on their own, but content is nice

ghost's avatar
ghost 18 years ago

thanks for the good ratings :D

ghost's avatar
ghost 18 years ago

Lol Great article this is a 10/10 for sure

ghost's avatar
ghost 18 years ago

thanks again for the ratting people :D this is doing way better than i expected.

ghost's avatar
ghost 17 years ago

lol two things - 1) w00t and 2) WOW what an honor - you taught the god of HBH a command!