This is a discussion on simple ls question within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> On 2008-02-11, ray <rollingviolation@domain.invalid.com> wrote: > Hey, that works! > > the double // appears to be a "bug" ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On 2008-02-11, ray <rollingviolation@domain.invalid.com> wrote: > Hey, that works! > > the double // appears to be a "bug" by using colors or long format > because if I do /bin/ls -ld */ I don't get the double //. You can also do just: \ls -d */ Save a few keystrokes. Thanks for the informative thread. I have tried several times to get the "-d" option to work and failed. Tom -- calhobbit (at) gmail [DOT] com |
| |||
| On Mon, 11 Feb 2008 20:05:29 -0800, Tom Newton wrote: > I have tried several times to get the "-d" option to work and failed. But you're used to failure, aren't you Alan (Connor)? > Tom Use your "real" name, Alan. -- "Tom N" ("Tom Newton") - the latest nymshift of "Alan Connor". Read more about the netkook Alan Connor here: http://www.pearlgates.net/nanae/kooks/ac/fga.shtml Email him: calhobbit@gmail.com or simpleman.s43@gmail.com |
| |||
| Tom Newton wrote: > On 2008-02-11, ray <rollingviolation@domain.invalid.com> wrote: >> Hey, that works! >> >> the double // appears to be a "bug" by using colors or long format >> because if I do /bin/ls -ld */ I don't get the double //. > > You can also do just: > > \ls -d */ > > Save a few keystrokes. > > Thanks for the informative thread. I have tried several times to > get the "-d" option to work and failed. > > Tom > > the \ means don't run the aliased command? I really do have to sit down one day and read the entire bash manual from beginning to end. Ray |
| |||
| On 2008-02-12, Ray <ray@!rollingviolation.example.com.invalid> wrote: > Tom Newton wrote: >> On 2008-02-11, ray <rollingviolation@domain.invalid.com> wrote: >>> Hey, that works! >>> >>> the double // appears to be a "bug" by using colors or long format >>> because if I do /bin/ls -ld */ I don't get the double //. >> >> You can also do just: >> >> \ls -d */ >> >> Save a few keystrokes. >> >> Thanks for the informative thread. I have tried several times to >> get the "-d" option to work and failed. >> >> Tom >> >> > > the \ means don't run the aliased command? Apparently. I just saw it somewhere and started using it. According to man bash it is the escape character and is a form of quoting which preserves the literal value of the next character. Maybe the literal value of a command, too? Which would be the full path to the executable that would be found using $PATH? I couldn't find any direct reference to the usage that concerns us. > I really do have to sit down one day and read the entire bash manual > from beginning to end. 3500 lines. I find playing with the examples in the advanced bash shellscripting guide to be more productive, using man bash as a reference. Don't let "advanced" scare you away. There is a lot of basiac stuff there. http://www.tldp.org/LDP/abs/ Tom -- calhobbit (at) gmail [DOT] com |
| ||||
| On Mon, 11 Feb 2008 22:03:52 +0000, ray wrote: > loki harfagr wrote: >> On Mon, 11 Feb 2008 16:29:51 +0000, ray wrote: >> >>> Loki Harfagr wrote: >>>> Mon, 11 Feb 2008 15:06:04 +0000, ray did cat : >>>> >>>>> what's the easiest way to just list directories? >>>>> >>>>> the shortest way I can do is >>>>> ls -p | grep / >>>>> >>>>> if I do >>>>> ls -d >>>>> all I get is >>>> Using lsd you should have stars in your eyes ;-) So, what about: >>>> $ ls -d * >>> rjoyal@filebox:/tmp$ ls >>> total 0 >>> drwxr-xr-x 2 rjoyal raynic 48 2008-01-23 23:23 vx/ drwxr-xr-x 2 rjoyal >>> raynic 48 2008-01-23 23:23 x/ -rw-r--r-- 1 rjoyal raynic 0 2008-02-11 >>> 10:28 x.x >>> >>> rjoyal@filebox:/tmp$ ls -d >>> drwxrwxrwt 6 root root 184 2008-02-11 10:28 ./ >>> >>> rjoyal@filebox:/tmp$ ls -d * >>> drwxr-xr-x 2 rjoyal raynic 48 2008-01-23 23:23 vx/ drwxr-xr-x 2 rjoyal >>> raynic 48 2008-01-23 23:23 x/ -rw-r--r-- 1 rjoyal raynic 0 2008-02-11 >>> 10:28 x.x >>> >>> so, no, ls -d * doesn't work. >>> >>> I want this: >>> drwxr-xr-x 2 rjoyal raynic 48 2008-01-23 23:23 vx/ drwxr-xr-x 2 rjoyal >>> raynic 48 2008-01-23 23:23 x/ (the directories only.) >>> >>> Ray >> >> OK! I read and replied too fast :-) >> Then, would that one be alright?: >> $ ls -d */ >> >> and the usual extensions will fit: >> $ ls -ld */ >> $ ls -lad */ >> >> > Hey, that works! > > the double // appears to be a "bug" by using colors or long format > because if I do /bin/ls -ld */ I don't get the double //. right, that's a "feature" from a default LS_OPTIONS part: ---------- -F, --classify append indicator (one of */=>@|) to entries ---------- I was a bit on a foot on that reply as I tested at home while I mostly use 'ls' at work where I anyway have a '.rc' file for my logon spread on every new machine that mostly sets a few personal habits like aliasing 'vi' to 'vi -u NONE' and unaliasing most every 2 letters command, this of course include 'rm' and 'ls' as I just can't bear the Redmoodoomed fashion to ask you twice and in a scalloped lingo if you're sure you want to do what you just confirmed previously you wanted to assure you wanted to do what you just previously typed, and worse again while you try and find out what files survived your last desperate and wrong action-yes caused by the semi-hemi-quavering on double-binded triple negated questions the list now comes in 3270 colors, just getme that good old BFG6000 jump to my hands! |