-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 11 February 2003 07:51 pm, FemmeFatale wrote:
> That will do. Thx Damian. Not that I'll remember the command cause I > don't understand grep yet... :) > So I'll just save your mail as a txt file. Hey FF, try this. Add the following line to your ~/.bashrc file alias rpmq="rpm -qa | grep -i $1" rpm = call the rpm program - -qa = list all files installed to standard output (screen) | = redirect output to grep = search input for text string - -i = ignore case $1 = variable indicating string to search for What the line I am telling you to add does is alias rpmq (or any other string you can remember for that matter) to the command rpm -qa | grep. So now when you type [greg@aurora ~]$ rpmq fluxbox You'll get (on my box anyway) fluxbox-0.1.12-2mdk Which is the same result as typing rpm -qa | grep -i fluxbox. The purpose of doing this is so you don't have to remember "rpm -qa | grep -i", just rpmq. You can do this with lot's of commands. Here is another example. I like my directory listings done to have the file size in human readable format as well as all file attributes displayed and the list displayed in color when I use the ls command. Since ls does not do this by default, I added this line to my .bashrc file: alias ls="ls -lsh --color" now when I type ls I get [greg@aurora ~]$ ls total 6.4M 20K -rw-r--r-- 1 greg greg 17K Feb 7 23:52 blackbox-menu 4.0K drwxrwxr-x 4 greg greg 4.0K Feb 11 09:00 Desktop/ 1.1M -rw-r--r-- 1 greg greg 1.1M Jan 26 21:31 diskoutput 4.0K -rw-rw-r-- 1 greg greg 1.3K Feb 2 10:11 Fix_Bug.patch 4.0K drwxr-xr-x 3 greg greg 4.0K Jan 29 09:26 GNUstep/ 80K -rw-rw-r-- 1 greg greg 73K Jan 26 22:32 ioerrors 4.0K drwxr-xr-x 3 greg greg 4.0K Feb 7 07:40 iso/ 156K -rwxrwxrwx 1 greg greg 151K Feb 2 10:04 kdebase.spec 156K -rwxrwxrwx 1 greg greg 151K Feb 2 10:04 kdebase.spec* 156K -rwxrwxrwx 1 greg greg 151K Feb 2 09:59 kdebase.spec~* 4.0K -rw-rw-r-- 1 greg greg 972 Jan 31 07:44 kdeerror 4.0K drwx------ 18 greg greg 4.0K Feb 11 19:25 Mail/ 4.0K drwxr-xr-x 2 greg greg 4.0K Jan 31 16:10 mnt/ 4.0K -rw-r--r-- 1 greg greg 2.6K Jan 27 11:44 partition.log 0 -rw-rw-r-- 1 greg greg 0 Jan 27 11:43 part.log 4.0K -rw-r--r-- 1 greg greg 1.6K Feb 11 12:05 qt3_build-erros 4.0K -rw-r--r-- 1 greg greg 1.6K Feb 11 11:33 qt3_build-erros~ 60K -rw-r--r-- 1 greg greg 54K Jan 30 22:44 results.txt 4.0K drwxrwxr-x 8 greg greg 4.0K Feb 11 08:40 RPM/ 4.0K drwxrwxr-x 2 greg greg 4.0K Feb 8 12:42 scripts/ 0 lrwxrwxrwx 1 greg greg 10 Feb 5 21:44 shared -> /mnt/smb/ 2.5M -rw------- 1 greg greg 2.5M Jan 19 23:42 shlop2.mpg 4.0K drwxrwxr-x 3 greg greg 4.0K Jan 29 12:49 staroffice6.0/ 4.0K drwx------ 6 greg greg 4.0K Feb 7 23:52 tmp/ 4.0K drwxr-xr-x 18 greg greg 4.0K Feb 9 20:09 win/ One more note. If you want these to take effect for all users, put them in the /etc/bashrc file. If you want them to be set for certain users, put them in the ~/.bashrc files of each user. - -- Greg -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+Say4wDpHP6GALAARAgzCAJ9e5GNebmN0sPp3a+KvV0pMx93oxwCdE2in UnCxxDt0han3xSBxLBTJz+E= =qRqu -----END PGP SIGNATURE-----
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
