Aug 25, 2010

A guide to Linux operating systems

Unix is an operating system which was first developed in 1960. It is astable, multitasking, multiuser operating system for all laptops, desktops and servers.
There are three parts of an UNIX operating system.
1. Kernel - The hub of the os. It manage time and memory. Handle file storage and communication.
2. Shell - It works as a inteface between user and the system.
3. Programs

Basic commands

ls - list the content in a directory
(type "man ls" to get more details about ls command)

cd - change the directory
cd .. - goto parent
cd or cd ~ - goto home

pwd - view the path to the current directory

mkdir - make a new file

rmddir - delete a directory if it is empty

cp - copy file
useage:"cp file1 file2" this will copy file1 as file2.

rm - remove file

cat - concatinate
useage: "cat foo.t" display the content of foo.t
("cat > bar.t" "cat >> bar" & "cat < bar.t") less - view page by page head - view first lines in a document useage: head 5 foo.t - will view fist 5 lines tail - view last lines in a document useage: tail 5 bar.t - will view last 5 lines wc : count words in a file & will give the output as "lines words charactors" grep - find keywords in a file useage: "grep 'foo bar' text.t" search for the pattern "foo bar". "command" > file - redirect the output to file
"command" < file - redirect the input from file

command1 | command2 - pipe command1s output to command2s input

man "command" - read the manual of the command

chmod - change the file mode

"command" & - command will run in background

No comments:

Post a Comment

Your comments are always welcome ...