![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Alias a command | b_garima | UNIX for Advanced & Expert Users | 2 | 10-22-2007 07:06 AM |
| a question about alias command | jayyu317 | UNIX for Dummies Questions & Answers | 1 | 12-11-2006 08:07 PM |
| alias for rm command | shriashishpatil | UNIX for Advanced & Expert Users | 8 | 02-23-2006 05:42 AM |
| I want to create a command alias | cstovall | UNIX for Dummies Questions & Answers | 2 | 12-03-2002 07:20 AM |
| Alias's & Functions - simple question | kornshellmaven | Shell Programming and Scripting | 6 | 11-01-2002 06:34 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
alias a simple ls -l command
how do I alias the following command:
ls -l |egrep 'drw|dr-|d--|d-w' The alias command needs single quotes and so does the above command, so this does not work: alias LSDIR 'ls -l |egrep 'drw|dr-|d--|d-w' ' My problem is how do I get a listing of only directories? Solaris 8 SUN Ultra 10 Thank you so much! |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
alias lsdir="ls -l |egrep 'drw|dr-|d--|d-w'"
Hope it will work for you |
|
#3
|
|||
|
|||
|
Why bother with an alias.
Code:
ls -ld |
|
#4
|
|||
|
|||
|
ls -ld
thank you bobbydsk, the double quotes was the magic... that works.
I dont know why, but ls -ld does not give me a listing of directories....? |
|
#5
|
|||
|
|||
|
how about this
Code:
alias lsdir="ls -l |grep ^d" |
|||
| Google The UNIX and Linux Forums |