LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-08-2004, 04:06 PM   #1
Cyberian
Member
 
Registered: May 2004
Distribution: SuSE
Posts: 117

Rep: Reputation: 15
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.
 
Old 12-08-2004, 04:25 PM   #2
veritas
Member
 
Registered: Aug 2003
Location: Dallas,TX
Distribution: Ubuntu Server, Slackware, Red Hat 6.1
Posts: 241

Rep: Reputation: 30
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.
 
Old 12-08-2004, 04:26 PM   #3
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Rep: Reputation: 32
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
 
Old 12-08-2004, 04:27 PM   #4
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
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.
 
Old 12-08-2004, 04:27 PM   #5
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Rep: Reputation: 32
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
 
Old 12-09-2004, 08:38 AM   #6
NetArch
LQ Newbie
 
Registered: Dec 2004
Location: DC Metro area, US
Distribution: Mint 18.1 Cinnamon, Ubuntu 16.04 LTS
Posts: 18

Rep: Reputation: 1
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.
 
Old 12-09-2004, 08:43 AM   #7
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
type:
history -c

for cleaning your history-list ;-)
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
The command line interface's appearance in FC3 benjithegreat98 Fedora 4 11-13-2004 12:59 AM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
51 characters only in the 1st Line of command line eggCover Linux - General 2 07-29-2004 01:28 PM
Command to display whole filestructure hierarchy f/ command line? mjewell Linux - Newbie 10 01-19-2004 10:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration