HOME BZU Mail Box Online Games Radio and TV Live Cricket Score All Albums
Go Back   BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Institute of Computing Bachelor of Science in Information Technology BsIT 6th Semester System Admin

System Admin Sir Ahmad Kareem

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 08-04-2010, 10:46 PM
.BZU.'s Avatar
Your Friendly Admin
Innocent Baby
BSIT Professional


 

Join Date: Sep 2007
Location: near Govt College of Science Multan Pakistan
Posts: 9,684
Thanks: 2,338
Thanked 2,223 Times in 1,816 Posts
Contact Number: Removed
Program / Discipline: BSIT
Class Roll Number: 07-15
.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute.BZU. has a reputation beyond repute
Time Spent Online: 3 Months 3 Weeks 5 Days 4 Hours 12 Minutes 13 Seconds
Read Linux Terminal Commands; Working at linux console mode,


The first command to learn is ls which is used to list the directory content.

In the shell, type
ls /
then press <Enter>
to list the content of the root directory.
------------

To list the content of a certain directory, put the directory as an argument to the command 'ls'.

Type
ls /usr/ X11R6/
then press <Enter>
It will lead to show the contents of directory known at X11R6 available in folder usr
------------

The root directory contains all directories and files.

Every Linux user account has its own home directory in the /home directory and the user's login name is used as a subdirectory in /home.

Type
ls /home/
then press <Enter>
------------
Use the 'touch' command to create any new file eg: tmpfile..
type:
touch tmpfile
------------
'pwd' means print working directory. it is used to show current working directory.
Type
pwd
------------
'cd' means changing directory.
'cd /' means changing directory to the root directory.
Type
cd /
By pressing 'cd' alone without any parameter, the shell goes to the user's home directory.

------------
Type
cp tmpfile tmpfile1
and press <Enter>

The command copies the file 'tmpfile' (you have been already created using touch command ) to another file called 'tmpfile1'.
------------
Type
mkdir tmpdir
and press <Enter>

This line of command creates a directory called tmpdir.
------------
Type
mv tmpfile tmpdir/
and press <Enter>

'mv' stands for move.
This command moves the file tmpfile to the directory tmpdir.

The '/' sign is optional which means tmpdir is a directory.
------------
When you input
ls tmpdir/
the shell appends the 'tmpdir/' to the working directory, i.e. /home/bdg

So, 'tmpdir/' is relative to your current working directory.

You may also list the content of the directory with its absolute path, i.e.
ls /home/bdg/tmpdir/
------------
In different types of shells, '~' refers to the user's home directory.
------------
In this case,
ls ~/tmpdir/
means listing the contents of /home/bdg/tmpdir
------------
Type
ls -l
and press
The parameter 'l' means long listing.
------------
Use
ls -a
By default, entries starting with '.' are not shown unless you use 'a' as a parameter.
You may use 'l' and 'a' together.

Enter
ls -al ..
The content of the upper level or (/home/) is printed. This is because '..' refers to the upper level.
------------
Type
cd
without giving any argument.
Run
pwd
You can see that you are now in your user directory. This is because running 'cd' without any parameters will return you to the user home directory.
------------
To move files, run
mv tmpfile1 tmpfile
where tmpfile1 is the source file and tmpfile is the destination file.

In the content list, the source file has been 'moved' to a new destination file. This action is equivalent to a rename.
------------
Run
mkdir tmpdir2
to create a new directory called tmpdir2.
------------
Run
rm tmpfile
to remove the file called tmpfile.
The file will disappeared.
------------
Run
rmdir tmpdir2
to remove the directory tmpdir2.
The directory tmpdir2 has disappered
------------
Run
rmdir tmpdir/
to delete the directory tmpdir.
You are not allowed to perform this function if the directory tmpdir is not empty.
Run
rm -r tmpdir/
where the parameter 'r' means removing content in the directory recursively.
------------
Go the the /bin directory.
This directory contains many of the Linux commands we frequently use.
For example,
cp, ls, mkdir, mv, pwd, rm, rmdir and touch
are all here.
------------
In your user home directory, create a directory called tmpdir1.
Create an empty file in the tmpdir1 directory.
View the content of that directory to make sure the file has been created.
Run
ln -s tmpdir1/ tmpdir2/
'ln' means link.
This command links tmpdir1 to a new directory called tmpdir2.
List the contents of the directory and you will see the two subdirectories.
List the contents of the directory called tmpdir1and you will see the content of the directory.
List the content of directory tmpdir2and you will see the content of the directory.

You see that the content of tmpdir2 is the same as tmpdir1.
This is because tmpdir2 is a link to tmpdir1.
Go to tmpdir2
Create a new file in tmpdir2
List the content to make sure the file has been created.
List the content of tmpdir1.

"../tmpdir1" means going down for one level. (/home/bdg/) means going up for one level to tmpdir1

You will find that the file has also been created in the tmpdir1 directory.

Linking is very useful in Linux operations. Later, you will find it especially helpful during software setup.

Go to the /home directory.
Create an empty file called tmpfile1.
You will find that you are not permitted to create this file.
__________________
(¯`v´¯)
`*.¸.*`

¸.*´¸.*´¨) ¸.*´¨)
(¸.*´ (¸.
Bzu Forum

Don't cry because it's over, smile because it happened
Reply With Quote
Reply

Tags
commands, console, linux, mode, terminal, working


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Introduction to Linux Slides. Muhammad Atique Network Operating Systems Fundamentals ? I 0 02-03-2011 06:09 PM
Linux administration course Waqas Ahmed User links/Others sites links 2 08-04-2010 11:04 PM
Chmod permission to files in linux ; Linux Terminal Commands; .BZU. System Admin 0 08-04-2010 10:47 PM
Download Full Linux Tutorial for Beginners, A to Z (Mastering Linux) Rapidshare. mediafire .BZU. Linux World 0 06-04-2010 05:55 PM
Linux beauty irfishahpk Linux World 0 18-08-2009 12:12 AM


All times are GMT +5. The time now is 12:54 PM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.