LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-19-2005, 05:27 PM   #1
toaster.waffle
Member
 
Registered: Feb 2005
Location: Ontario, Canada
Posts: 97

Rep: Reputation: 15
where do ALIASes go?


when i make an alias, what happens?

i've looked in /bin, /sbin, /usr/local/bin, /usr/local/sbin..

what if I want to get rid of one?

thanks




also, how can you search files?
 
Old 05-19-2005, 05:43 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
In your user home directory, there is probably a hidden file called .bashrc (or something similar). If not, you can copy /etc/bashrc into your home directory: cp /etc/bashrc ~/.bashrc.

Open the file in any editor; there is probably a section with some aliases already. To add your own, just use the same format at those you see there.

To get rid of an alias, just comment it out, or delete it.

After adding/removing an alias, run the command 'source ~/.bashrc' to activate the new aliases. Or do it the windows way and reboot. Your choice.

What do you mean 'search files'? Search for files, or search within files?

To search for files, you can use find (see the man pages for find), or su to root and run updatedb to make a database of all files on the system and use locate to find a file (you can use partial or complete names - all matches to the string you use will be displayed).

To search within a file, use find piped through grep, or awk.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Aliases Red Squirrel Linux - Software 2 05-10-2005 06:58 PM
Aliases SkyeFyre Fedora 8 03-18-2005 07:35 PM
aliases in C++ djgerbavore Programming 6 03-16-2005 08:35 PM
See aliases gubak Linux - Newbie 0 08-04-2004 06:13 AM
what aliases do you use most? m0rl0ck Linux - General 17 02-12-2003 01:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:24 AM.

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