 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

28th April 2012, 08:16 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: Georgia, USA
Posts: 2

|
|
|
Help with the Terminal
I know this is a beginner's question, but when I go into the terminal and I am typing a command, i never really know how or why certain arguments work and what the rules are.
An example is that i just realized that I can edit administrative files in gedit if I go into the terminal, become root, then enter gedit -s file.txt
This really was a lucky guess because when i look at the help lists, all of the commands and augments(is that what they are called?) just confuse me.
Can anyone help me out?
|

29th April 2012, 01:30 AM
|
|
Registered User
|
|
Join Date: Mar 2012
Location: SFBay Area
Posts: 81

|
|
|
Re: Help with the Terminal
Look at "man" or "info" files.
Type: man gedit
or
Type: info gedit
|

29th April 2012, 02:00 AM
|
|
Registered User
|
|
Join Date: Jul 2005
Posts: 640

|
|
|
Re: Help with the Terminal
When you launch another program from within a terminal, the new program will start with the same user permissions as you have in the terminal. So if you open a terminal and start gedit as your normal non-root user gedit inherits those permissions.
If you su to root then launch gedit, gedit will run as root and be able to modify files that your normal user account cannot.
__________________
======
Doug G
======
|

29th April 2012, 03:39 AM
|
|
Registered User
|
|
Join Date: Mar 2012
Location: Sacramento CA
Posts: 26

|
|
|
Re: Help with the Terminal
Everyone was a beginner at one time, so don't worry. The bar at the top of the Fedoraforum contains "Linux Help" when you click on it, you get a lot of information, scrolling further down, you find links to several sites. Good ones to explore are "Introduction to Linux" and Linux.com (click on tutorials and scroll down to new user
guides. I also like the CSU Fresno website. Click on Fedora 14 and you can pick up some tips and become more comfortable with a terminal.
You will notice similarities between many commands and options. For example, uname -r will give you your linux version.
Hope this helps!
|

29th April 2012, 04:25 AM
|
|
Registered User
|
|
Join Date: Dec 2007
Location: Melbourne, Australia
Posts: 162

|
|
|
Re: Help with the Terminal
Hello nicholasarchamb,
The arguments to a command are sometimes called switches, because they switch on or off certain functionality.
As a simple example which you may well be familiar with,
ls -al
has 2 arguments which are placed after the minus sign. The letter "a" tells the command "ls" to list all files and the letter "l" tells the command "ls" to list the files in long format. Most commands use the minus sign for their arguments, but not all. As mentioned above, the man pages provide the details, but many man pages are written in a dense style with little regard to beginners' levels of understanding so that can be a bit daunting to read. As one gets more experienced though, they become invaluable because one simply can't remember the sheer volume of data one might need to run their system. Ben.
|

2nd May 2012, 11:43 AM
|
|
Registered User
|
|
Join Date: Nov 2007
Location: Berkeley, California
Posts: 690

|
|
|
Re: Help with the Terminal
Quote:
Originally Posted by nsnbm
Hello nicholasarchamb,
The arguments to a command are sometimes called switches, because they switch on or off certain functionality.
|
The command line arguments are arguments to a command, while 'switches' (otherwise known as 'flags', or 'command options') -- are the modifiers that modify the default command. The difference between the two is crucial and in order not to confuse beginners it is advisable to use appropriate terminology.
|

2nd May 2012, 12:37 PM
|
|
Registered User
|
|
Join Date: Dec 2007
Location: Melbourne, Australia
Posts: 162

|
|
|
Re: Help with the Terminal
Hello Mariusz W,
Thank you for that clarification. Hopefully the original poster is now better informed after your post. Ben.
|

2nd May 2012, 12:57 PM
|
 |
Registered User
|
|
Join Date: Jun 2004
Location: Laurel, MD USA
Posts: 5,442

|
|
|
Re: Help with the Terminal
A lot of times, the standard --help option is really good, the man page can be too much detail
EX:
(shows a list of all the options and a short description of their usages and purpose)
|

2nd May 2012, 01:34 PM
|
|
Registered User
|
|
Join Date: Dec 2007
Location: Melbourne, Australia
Posts: 162

|
|
|
Re: Help with the Terminal
Hello Mariusz W again,
Just as a follow up to use of the word "switch" I refer you to the following reference:
Cornes P 1997 The Linux A-Z. New York: Prentice Hall.
On page 14 the author writes: " There are many occasions when entering a command where you will either want the command to perform some extra action beyond the default function or where you will want to suppress some part of the command's normal operation. In these cases what you need to do is to pass command line switches into the command to switch on (or off) the functionality you require. In order to provide a degree of consistency the normal way to pass switch values to a command is to use a hyphen (-) before the switch itself to signify that this is a switch and not just a normal command parameter (such as a file name fo example)."
Of course the word "switch" has a number of meanings and references depending on context but the author here is referring to what is alternatively called "arguments."
In the reference:
Kernigan B W & Pike R 1984 The Unix Programming Environment. Englewood Cliffs, NJ: Prentice Hall
the authors refer to command line arguments as "options" as well as "arguments."
Language is a wonderful thing really. I hope that my original post had enough of a context and description which was relevant to the query and comprehensible to the original poster, and hopefully helpful in its detail. Ben.
Last edited by nsnbm; 2nd May 2012 at 02:15 PM.
Reason: added information
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 15:13 (Saturday, 18-05-2013)
|
|
 |
 |
 |
 |
|
|