Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
Replying to Help A Beginner To Learn To Use Linux Terminals
Posted 04 November 2005 - 11:44 AM
You can use two utilites for viewing text files on the screen: cat and more
cat is used for viewing short files (less than one page), and more is used for wiewing longer, multi-0page files.
cat merely writes the file to the screen and then exites.
more provides a simple interface to move backwards and forwards through a file.
"f" or "Space" key to move a page forward,
"Enter" key to move a line forward,
"b" to move a page back and
"q" to quit.
if you want to just look at the beginneing or end of the file you can use the
head and tail commands.
Actually there is a third utility for viewing files, called less
less is better than more. In fact, less is an improved version of the more program that allows more flexible scrolling and searching within the file.
Too see how it works, run less words (assum there is a text file named words),
Then press the "h" key for help. more is a good starting point for viewing files, but many expert user prefer less
Posted 26 October 2005 - 05:42 PM
I started with it, but unfortunately never ended because of a lack of time . This will learn you how to administrate your linux pc. It might be that not every tool works because it's not installed, but don't worry too much about it (yet).
Posted 26 October 2005 - 12:00 PM
You just post what i want to say, navigating the Filesystem.
By now, you should be able to move any directory that you want to work in.
This is the first thing that should know.
Now I am going to talk about Copying, moving, renaming and deleting files.
Linux/UNIX provides the cp command to copy files.
When you copy a file you can name the copy anything you like,
but using names which only include alphanumeric characters a-z, A-Z, 0-9is safer.
cp also has options which allow you to copy groups of files and whole directories easily. Please check with man command.
Moving and renaming files is done with mv command.
mv is used to move one or more files between directoried or to rename a file. using mv command to move a file to the same directory with different name is know as renaming the file.
rm , short for "remove", deletes files.
Here are an examples, assume that there are two file, filea and fileb, in /pub directory.
cd (change to your home directory) cp /pub/filea ~/filea (copy filea form /pub to your home directory) cp /pub/fileb ~/fileb (copy fileb form /pub to your home directory) ls (list files in your home directory) mkdir blah (create a directory blah in your home directory) mv filea blah (move filea to directory blah) ls (list files in your home directory) cd blah (change to blah directory) ls (list files in blah directory) cd .. (change to upper directory, your home directory) mv fileb filec (rename fileb to filec) ls (list files in your home directory) rm filec (delet filec)
Posted 26 October 2005 - 04:39 AM
ls = list files in current directory
cd = change directory
mkdir = make new directory
rm = remove
mv = move, but can also be used as a tool to rename files
chmod = change permissions on a file
locate = used to find files
Now, when you're referring to files, say, you want to execute a file in the current directory, you must type ./ and then the filename to let it know you want the current directory...
if you're using the cd command, to go to the directory above, use "cd .."
you might want to search google for a list of unix commands, but this will get you started.
Posted 26 October 2005 - 01:04 AM
The Linux/UNIX filesystem is made up mainly of two types of files - normal files and directories. "Normal" files include programs, text, imanges, etc. Directories are files which can contain other files, including other directories. Their use is for organising files. If you are familiar with Microsoft Windows, a directory on UNIX/Linux is the same thing as a "folder" in Windows terminology.
When you open a terminals, your initial position in filesystem is your home directory.
Try to type pwd and press enter. (pwd -- Print Working Directory)
The output of pwd is the pathname of your current directory. e.g. /home/sinx
as you can see, the directory names are separated by forward slash, /. This is different from MS-DOS which uses the backslash, "\". The root directory is "/". All files and directories in the filesystem are located underneath the root directory. That's why all full pathnames will start with "/".
You can list the files in your current directory using the ls (list) command. there are some opthins you may specify for ls command:
-l (LONG listing-show all file details)
-a (ALL files, including files starting with "." that are normally hidden)
-t (Sort by TIME last modified)
-R (RECURSIVE listing -show contents of subdirectoryes as well)
After this, I think you will understand the filesystem is hierarchically structured.
Next step is to know how to navigating the Filesystem. I will post something about that later.
Posted 25 October 2005 - 10:26 PM
the question is : help with "terminal".
And the answer is a help for bash !
Ok, that's rather true.
Terminal is a way of talking with your computer, giving instructions directly to Unix. And bash is a sub-language of Unix, so it's usefuls for that purpose.
And for course, it's not the only way. Bourne Shell, ksh and csh are other sub-languages, not very different from each other, and all similar by the fact that they are Unix commande languages.
Posted 25 October 2005 - 08:13 PM
when typing a command whose fullcommand name lets say is this_command press TAB key after lets say this_ ..it will provide you with some options to complete the name or complete the name of the command. This also goes for any file name.
~/ is you home director ..ie when ever you do cd ~/ you will go to your home directory. Similary if you do ~user/ you will go to that users directory ..if you have permission.
If you are outside of Grpahics mode ..you can use Alt F1 , aLT F2 etc to switch to diffet terminals ..if you have graphics on you can use Ctrl Alt F1 etc to go to text mode..and normally Alt Ctrl F7 to back to graphics (depends ..how many terminals you are running..i think this is some thing default ..but this could be differnt ..ie F5 or F6 perhaps)
one of the most useful thin in linux is grep. You can capture ..or uncapture a line with it (lay man way of saying it)
A way to do is by pipes
lest say you know that
will spill out the contents of file blah on screen. You can use
cat blah | grep name
to capture all lines with text name in them
cat blah | grep -v name
will capture all lines ..except for lines having text name in them
just few tricks ..which will help you get started
Read the tutorials mentioned..preferably from some University Unix Course Website ..it will give you a comprehensive background
Posted 25 October 2005 - 02:01 AM
Few quick tips:
ls - lists all files in current directory
rm/rmdir - remove a file or directory respectivly... DOES NOT GIVE YOU A "are you sure you want to delete?" type message. So be careful lol.
cd directory will move you around the directories.
so yes, read some tutorials, play around, and enjoy. Once you can use the terminal its got some awesome fun stuff to use
Posted 24 October 2005 - 11:55 AM
Bourne, Again, SHell.
Basically the latest shell.
You could spend months learning bash, its a very usefull tool.
Its a method of comunicating with running programs, its also a programming language.
Fortunatly, you dont need to know everything about BASH to use it.
This will get you started,
it covers the basics you need.
but its not a complete guide, it doesnt go into programming, or advance techniques.
Posted 24 October 2005 - 11:12 AM
well I don't know how to use terminals i am just a starter in linux so can someone plz explain it nice and slow how to use it ?