This is a discussion on making the ls command my bitch within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> I have 3 questions and hopefully at least 1 of them can be answered. 1.) Does the ls command ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have 3 questions and hopefully at least 1 of them can be answered. 1.) Does the ls command have a switch to only list hidden files? 2.) Is it possible to only list directories? 3.) How do I put vim into insert mode automagicly when it's opened by slrn to post? I know question number 3 is way out there but I figure enough of us in here use slrn and surely somebody else was annoyed by this who is smarter then me and figured out how to do it. -- If a man talks in the woods and there is no woman to hear him is he still wrong? |
| |||
| On 2004-04-15, Scott Eberl <scott@airea420.com> wrote: > I have 3 questions and hopefully at least 1 of them can be answered. > > 1.) Does the ls command have a switch to only list hidden files? what hidden files?? ken |
| |||
| On 2004-04-15, Kenneth <Kenneth@pickone.anyone> wrote: > On 2004-04-15, Scott Eberl <scott@airea420.com> wrote: >> I have 3 questions and hopefully at least 1 of them can be answered. >> >> 1.) Does the ls command have a switch to only list hidden files? > > what hidden files?? > > ken Any files starting with a "." such as .bashrc -- Scott Eberl Telephony Applications Coordinator |
| |||
| On 2004-04-15, Scott Eberl <scott@airea420.com> wrote: > On 2004-04-15, Kenneth <Kenneth@pickone.anyone> wrote: >> On 2004-04-15, Scott Eberl <scott@airea420.com> wrote: >>> I have 3 questions and hopefully at least 1 of them can be answered. >>> >>> 1.) Does the ls command have a switch to only list hidden files? >> >> what hidden files?? >> >> ken > > Any files starting with a "." such as .bashrc > ls -a, can be found in man ls. That's not a hidden file, it's just a file that begins with a "." I've never heard of hidden Linux files. ken |
| |||
| On Thu, 15 Apr 2004 07:51:38 -0000, Scott Eberl <scott@airea420.com> wrote: > I have 3 questions and hopefully at least 1 of them can be answered. > > 1.) Does the ls command have a switch to only list hidden files? > > 2.) Is it possible to only list directories? I think you should use find instead of ls. It gives you more options. > 3.) How do I put vim into insert mode automagicly when it's opened by > slrn to post? Take a look at vim's manpage. I think you can do it with the -c command line argument. Sebastian -- ONE FAMILY! Leipzig 2012 - Olympic Summer Games http://www.leipzig2012.com/ |
| |||
| On Thu, 15 Apr 2004 08:46:39 +0000, Kenneth wrote: > On 2004-04-15, Scott Eberl <scott@airea420.com> wrote: >> On 2004-04-15, Kenneth <Kenneth@pickone.anyone> wrote: >>> On 2004-04-15, Scott Eberl <scott@airea420.com> wrote: >>>> I have 3 questions and hopefully at least 1 of them can be answered. >>>> >>>> 1.) Does the ls command have a switch to only list hidden files? >>> >>> what hidden files?? >>> >>> ken >> >> Any files starting with a "." such as .bashrc >> > > ls -a, can be found in man ls. > > That's not a hidden file, it's just a file that begins with a "." > > I've never heard of hidden Linux files. > > > > ken i think that he wanted ONLY files that begin with '.', and 'ls -a' will list all files |
| |||
| On Thu, 15 Apr 2004 07:51:38 +0000, Scott Eberl wrote: > I have 3 questions and hopefully at least 1 of them can be answered. > > 1.) Does the ls command have a switch to only list hidden files? > ls -a | grep '^\.' > 2.) Is it possible to only list directories? find . -maxdepth 1 -type d regards, i. |
| |||
| Scott Eberl wrote: >I have 3 questions and hopefully at least 1 of them can be answered. > >1.) Does the ls command have a switch to only list hidden files? > > No (there aren't any such things in Linux); however, the -a option will list the files with a leading dot. >2.) Is it possible to only list directories? > > No, not without piping the output of ls through sed or grep or something. Try this: ls -aCF this will list the "dot" files, directories with a slash, executables with an asterisk -- if you like this display, make an alias, say "lc". Might be a step in the right direction. Also, try ls -1 to list files in one column (you can add -aCF to that). >3.) How do I put vim into insert mode automagicly when it's opened by > slrn to post? > > Well, pretty much can't. You can send it to a specifc pattern with vi +/pattern file then type "i" when it opens... >I know question number 3 is way out there but I figure enough of us in >here use slrn and surely somebody else was annoyed by this who is >smarter then me and figured out how to do it. > > > |
| ||||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 In alt.os.linux.slackware, Ivan dared to utter, > ls -a | grep '^\.' UUOG (Useless Use Of Grep). ls -ad .* - -- It is better to hear the rebuke of the wise, Than for a man to hear the song of fools. Ecclesiastes 7:5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFAfobwL3KiNGOqr6ERAlrVAKCuvrRX6CQ2kwi6A02lIi TFMNguswCgy2pr 6VCHJQGsxgvDV0EBa56G/KU= =SPw4 -----END PGP SIGNATURE----- |