You must first logon to a UNIX machine. The method(s) to do this vary, so check with the facility you are aton how to logon.Once logged on, these commands are essential to learn. More information about them (and other commands)can be obtained by entering man command (short for manual). For example, to obtain a manual about the command cat, you would type man cat.
cat - List a file
USAGE: cat [ -n ] file...
OPTIONS: -n display line numbers.
EXAMPLES: cat myprog.c
cat -n myprog.c
cd - Change directory
USAGE: cd [ directory ]
EXAMPLES: cd
cd mysource
NOTE: The command cd with no arguments will take you to your home directory ( i.e.
the directory you start in when you first login to the system ).
The command cd .. will take you to the directory above the one you are in.
cp - Copy a file
USAGE: cp file1 file2
cp file1 ...directory
EXAMPLE: cp myprog.c myprog.1.save
NOTE: Suppose your instructor tells you to get a copy of the file firstprog.p that is in the
directory /u/mathcs/fs/ravi. The complete command to copy this file to the directory
you are in is:
cp /u/mathcs/fs/ravi/firstprog.p firstprog.p
It is important to note that the forward slash "/" is used to specify path names.
logout - Exit unix
USAGE: logout
NOTE: Where you are returned to when you logout is depending on the method used to login
to the unix system. If you try to logout and you get an error message
“there are stopped jobs”, then type a fg command to go back to that job, then
you can properly exit the session and logout.
ls - List the contents of the current directory
USAGE: ls [ file1... ]
EXAMPLES: ls
ls *.exe (this lists only files that end with the extension .exe)
ls pkzip.* (this lists only files that begin with pkzip and has any extension)
mkdir - Create a new directory
USAGE: mkdir directory...
EXAMPLE: mkdir junkdir
more - List a long file
USAGE: more file ...
EXAMPLES: more myprog.c
more a.c b.c c.c
NOTE: You can also use this with other unix commands that involves listing data.
EXAMPLES: finger |more
cat file |more
mv - Rename or move a file
USAGE: mv file1 file2
mv file1 ... directory
EXAMPLE: mv a.out myfirst
passwd - Change login passwd
USAGE: passwd
NOTE: As you type in the passwords, the characters are not displayed on the screen.
pwd - Display the current directory
USAGE: pwd
NOTE: pwd tells you which directory you are in.
rm - Remove file(s)
USAGE: rm file...
EXAMPLE: rm myfirst.old
rmdir - Remove an empty directory
USAGE: rmdir directory ...
EXAMPLE: rmdir junkdir
NOTE: In order to remove a directory that contains files, you must first remove the files with
rm and then remove the directory with rmdir.
finger - display information about local and remote users.
USAGE: finger
NOTE: If you use this command followed by a user’s login name, it will give some information
about that’s user’s account; directory route, last time he or she logged in, etc.
USAGE: finger user...
EXAMPLE: finger stsc
who - Identifies who is currently logged on the unix machine, but displays less information than
with the “finger” command.
USAGE: who
spell - It checks your documents for spelling errors using an online dictionary.
USAGE: spell file
EXAMPLE: spell commands.txt
Subscribe to:
Post Comments
(
Atom
)
Popular Posts
-
RS Agarwal quantitative aptitude pdf free download RS Agarwal book for Quantitative Aptitude is one of the best books for Competitive Exa...
-
Hello friends, Here is the link to download e-book of " JAVA The Complete Reference - 7th " edition by Herbert Schildt ...
-
Download VTU MCA Old question papers for third Semester. Download System Software (SS) Question papers Download Computer Networks (CN) ...
-
Facebook: Today we're hosting f8, our developer conference, to connect with the community and share where we're headed. F...
-
Hello friends, Today I'm sharing all LAB Programs of Web Programming, Following is the list of all problems: 1. Develop and demons...
-
Hey friends, Now you can DOWNLOAD Syllabus of MCA (VTU- Visvesvaraya Technological University)
-
Download Old Question Papers of VTU MCA Semester 4 [Download SE - Software Engineering Question Papers] [Download Web Programming Q...
-
Despite the tumor-shrinking medical miracle that has bought her a few years, Hazel has never been anything but terminal, her final chap...
-
S.R. Number Sub. Download Link 1 VNSGU - BCA Old Exam Papers Download
-
Hello, Friends... Now you can download Ebook for Computer Organisation, which is there in MCA Sem 1 (VTU) syllabus. DOWNLOAD PAS...
plz also write different switches of those command & their use.......
ReplyDelete@kanisha, about which command u want to know?
ReplyDelete