LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   FC3: Command Line (https://www.linuxquestions.org/questions/fedora-35/fc3-command-line-264173/)

Cyberian 12-08-2004 04:06 PM

FC3: Command Line
 
Hi,

I believe it is called the Command Line. It is this bar I type in the name of an application and it opens it.

1. How do I set the history to 0?

2. How do I add custom names? i.e. 'ff' will launch Firefox. Cuts my time in typing.

veritas 12-08-2004 04:25 PM

Quote:

2. How do I add custom names? i.e. 'ff' will launch Firefox. Cuts my time in typing
For custom names, just open up the file called .profile in your home directory. If its not there, then make one. Add a line that looks like this:
Code:

alias ff='/home/cyberian/firefox/./firefoxprogram'
You will probably have to log out and log back in for the it to recognize your alias setting.

Samsara 12-08-2004 04:26 PM

Re: FC3: Command Line
 
Quote:

Originally posted by Cyberian
Hi,

I believe it is called the Command Line. It is this bar I type in the name of an application and it opens it.

It's probably bash, the Bourne Again Shell, strictly speaking. Different shells have slightly different features and ways of configuration, so it's important.
Code:

echo $SHELL
will tell you which shell you are in fact using.
Quote:

Originally posted by Cyberian
2. How do I add custom names? i.e. 'ff' will launch Firefox. Cuts my time in typing.
Code:

alias ff=firefox
or something like that. "man alias" will bring up the bash manual; within this manual, you can search for the description of alias typing "/alias".

HTH,

Samsara

marghorp 12-08-2004 04:27 PM

One simple and usefull thing for the 2. question. If you set the history right. Fade or something. There are three ways of history. Anyway when history is set the right way. It works like a linux command line. Once the command is long enough to be unique, then this is the command, that will be run.

Like if you run firefox and it's your only program beginning with f, then when you will press f it will automatically continue your command with faded letters irefox. In that moment press enter and you will be able to run firefox with only one character. But if you want to make symbolic names for your commands, refer to the command ln, and be sure to put the symbolic links within your $PATH variable paths. You can see the PATH variable by typing echo $PATH. Put your symbolic links in one of those directories. Or create one of your own, like /home/me/symbols/ and put your symbolic links in there, and put that directory in your PATH variable. But remember, that any existing commands should not be replaced with your symbolic commands. If you have any questions, post them here.

Samsara 12-08-2004 04:27 PM

Re: FC3: Command Line
 
Quote:

Originally posted by Cyberian
1. How do I set the history to 0?
I suspect "man history" will tell you more. Can't test it myself right now.

Samsara

NetArch 12-09-2004 08:38 AM

To 'erase' your history:

From a shell prompt/command prompt, type:
rm ~/.history This removes the history file - you can also try mv ~/.history ~/.history.backup if you want to preserve your old stuff.

touch ~/.history Touch creates a new empty file.

If I remember right, default file permissions are 775(?) - that is, rwx (the 7) for you - the owner, rwx for the group , which is normally the same as the owner, and r-x for others. I'm on my work PC right now - WinXP, so you'll have to try and see...

And pardon me if you already know this, but the tilde <~> is a shorcut for the user's home directory, normally /home/userid. Your history file is located in the root/base of your home directory - /home/userid/.history, as is your .profile, as someone pointed out earlier.

overlord73 12-09-2004 08:43 AM

type:
history -c

for cleaning your history-list ;-)


All times are GMT -5. The time now is 05:42 PM.