Saturday, November 28, 2009

Best Unix & linux Command

U N I X

ls ................. show directory, in alphabetical order
logout ............. logs off system
mkdir .............. make a directory
rmdir .............. remove directory (rm -r to delete folders with files)
rm ................. remove files
cd ................. change current directory
man (command) ...... shows help on a specific command
talk (user) ........ pages user for chat - (user) is a email address
write (user) ....... write a user on the local system (control-c to end)

pico (filename) .... easy to use text editor to edit files
pine ............... easy to use mailer
more (file) ........ views a file, pausing every screenful

sz ................. send a file (to you) using zmodem
rz ................. recieve a file (to the unix system) using zmodem

telnet (host) ...... connect to another Internet site
ftp (host) ......... connects to a FTP site
archie (filename) .. search the Archie database for a file on a FTP site
irc ................ connect to Internet Relay Chat
lynx ............... a textual World Wide Web browser
gopher ............. a Gopher database browser
tin, trn ........... read Usenet newsgroups

passwd ............. change your password
chfn ............... change your "Real Name" as seen on finger
chsh ............... change the shell you log into

grep ............... search for a string in a file
tail ............... show the last few lines of a file
who ................ shows who is logged into the local system
w .................. shows who is logged on and what they're doing
finger (emailaddr).. shows more information about a user
df ................. shows disk space available on the system
du ................. shows how much disk space is being used up by folders
chmod .............. changes permissions on a file
bc ................. a simple calculator

make ............... compiles source code
gcc (file.c) ....... compiles C source into a file named 'a.out'

gzip ............... best compression for UNIX files
zip ................ zip for IBM files
tar ................ combines multiple files into one or vice-versa
lharc, lzh, lha .... un-arc'ers, may not be on your system

dos2unix (file) (new) - strips CR's out of dos text files
unix2dos (file) (new) - adds CR's to unix text files


$ lpr -PNAME FILE To print a UNIX text or PostScript file, type the following command at the system prompt:



Keyboard shortcut keys

CTRL + B Moves the cursor backward one character.
CTRL + C Cancels the currently running command.
CTRL + D Logs out of the current session.
CTRL + F Moves the cursor forward one character.
CTRL + H Erase one character. Similar to pressing backspace.
CTRL + P Paste previous line and/or lines.
CTRL + S Stops all output on screen (XOFF).
CTRL + Q Turns all output stopped on screen back on (XON).
CTRL + U Erases the complete line.
CTRL + W Deletes the last word typed in. For example, if you typed 'mv file1 file2' this shortcut would delete file2.
CTRL + Z Cancels current operation, moves back a directory and/or takes the current operation and moves it to the background. See bg command for additional information about background.



Command line shortcuts

In addition to the below command line shortcuts, it is also helpful to use the alias command that allows you to specify a keyword for frequently used commands or mistakes.
~ Moves to the user's home directory.
!! Repeats the line last entered at the shell. See history command for previous commands.
!$ Repeats the last argument for the command last used. See history command for previous commands.
Reset Resets the terminal if terminal screen is not displaying correctly.

shutdown -h now Remotely or locally shuts the system down.







Basic Directory Commands

These are typed at the shell prompt host:~>.
In UNIX, your files are organized in directories and subdirectories. When you first log in to your account, you are placed in your home directory which you can refer to with the

character ~.cd DIR Go to the directory called DIR
cd .. Go to the directory above the current directory
mkdir DIR Create a new directory called DIR
rmdir DIR Remove the directory DIR (must be empty first; if not, use rm -r)
cd or cd ~ Go to your home directory
mv DIR1 DIR2 Move or rename a directory from old name DIR1 to new name DIR2





























VARIANTS –Below is a listing of various Unix variants
AIX / AIXL
BSD
DUnix
DYNIX/ptx
HP-UX
IRIX
MINIX
OSF/1
QNX
SCO
Sun Solaris
System V
Tru64 Unix
Ultrix
Unisys
UnixWare
Xenix



















Printing to Your Own Printer

You can print UNIX files and mail messages to your own printer and a network printer. The latter is easier, but requires that you walk to the network printer to pick up your output. To print a UNIX file on your own printer, you must first "download" it to your desktop computer. Exactly how you do this depends on which communication package you use, as well as which type of computer you have. These instructions apply only to PCs (and compatibles) that are running under DOS, are linked to SUNet, and have the ftp protocol installed.


At the DOS prompt (assumed here to be C:\>), enter:C:\> ftp HOSTNAME Connects your PC to HOSTNAME
(username) userid Your account on the host
Password: xxxxxx Replace xxxxxx with your password
ftp> cd DIRECTORY Change to DIRECTORY
ftp> get FILENAME Copies FILENAME to PC
ftp> quit Exit ftp and go to DOS
C:\> copy FILENAME lpt1 Prints FILENAME on lpt1

Use the / character to separate directory and file names when specifying a path.
Printing



where NAME is the name of the printer, e.g.,polya0.

1 comment:

Anonymous said...

[url=http://www.onlinecasinos.gd]casino[/url], also known as accepted casinos or Internet casinos, are online versions of well-known ("buddy and mortar") casinos. Online casinos encouragement gamblers to move up and wager on casino games unquestionably the Internet.
Online casinos customarily submit on the bazaar odds and payback percentages that are comparable to land-based casinos. Some online casinos turn one's back on higher payback percentages with a take immersion organization games, and some movement common payout consequence profit audits on their websites. Assuming that the online casino is using an correctly programmed unsystematic clear up generator, itemize games like blackjack clothed an established form a face edge. The payout holding as a replacement in the behalf of these games are established on non-standard correct to the rules of the game.
Uncountable online casinos absolve out or mastery their software from companies like Microgaming, Realtime Gaming, Playtech, Prevailing Prank Technology and CryptoLogic Inc.