Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #13560

Re: list but not dirs?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Unknown <dog@gmail.com>
Newsgroups comp.os.linux.misc
Subject Re: list but not dirs?
Date Tue, 3 Feb 2015 07:43:24 +0000 (UTC)
Organization A noiseless patient Spider
Lines 45
Message-ID <pan.2015.02.03.07.54.12@gmail.com> (permalink)
References <pan.2015.01.27.08.20.10@gmail.com> <tvakpbxlcj.ln2@news.roaima.co.uk>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Tue, 3 Feb 2015 07:43:24 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="ff4ecb1c933bae7750625ba671465bfd"; logging-data="10092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18oJtmR6RpMiEfG66FQmqdYK+E85ymHk98="
User-Agent Pan/0.133 (House of Butterflies)
Cancel-Lock sha1:u5YCP2Gw/CfLxUV78abBIuBRAYU=
Xref csiph.com comp.os.linux.misc:13560

Show key headers only | View raw


On Tue, 27 Jan 2015 11:56:13 +0000, Chris Davies wrote:

> Unknown <dog@gmail.com> wrote:
>> I want to see all *.pdf [or any *] in all of my 30 workSpace, with each
>> having average 3 eTerminals open.
> 
>> #!/bin/bash
>> echo "List File:Arg1 inAll active Dirs:per:lsof"
> 
> Your code appears to try to list all files matching a specified suffix
> in the current directory of each process you have running. Is that what
> you want?
> 
> #!/bin/bash
> #
> SUFFIX="$1"
> echo "Listing files of type $SUFFIX in all active directories"
> 
> for DIR in $( lsof -u "$USER" | awk '$4=="cwd" && $5=="DIR" {print $9}'
> | sort -u ) do
>     echo "In directory: $DIR"
>     for FILE in "$DIR"/*."$SUFFIX"
>     do
> 	test -f "$FILE" && echo "  $FILE"
>     done
>     echo
> done
> exit 0
> 
> Chris

!! Fantastic !!
Imagine how this helps you find recently accessed files in your 99
open eterminals.

I've patched it to be more general purpose:....
  for FILE in "$DIR"/*"$PartFlID"*

Thanks a lot.

The next big problem is to associate WorkSpaceNumber with pid/eTerminal.
Old-kde3 showed each-pid grouped to its WS, via `pstree -p`
Since then, `pstree -p` shows all pid, as descendents of ONE <startx>,
with blackbox, my prefered  windowManager.

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

list but not dirs? Unknown <dog@gmail.com> - 2015-01-27 08:10 +0000
  Re: list but not dirs? Tim Watts <tw_usenet@dionic.net> - 2015-01-27 09:27 +0000
  Re: list but not dirs? Chris Davies <chris-usenet@roaima.co.uk> - 2015-01-27 11:56 +0000
    Re: list but not dirs? Unknown <dog@gmail.com> - 2015-02-03 07:43 +0000
  Re: list but not dirs? Joe Beanfish <joebeanfish@nospam.duh> - 2015-01-28 14:51 +0000
    Re: list but not dirs? Unknown <dog@gmail.com> - 2015-02-03 11:53 +0000
      Re: list but not dirs? Joe Beanfish <joebeanfish@nospam.duh> - 2015-02-03 14:17 +0000
        Re: list but not dirs? Moe Trin <ibuprofin@painkiller.example.tld.invalid> - 2015-02-03 21:56 +0000
      Re: list but not dirs? Rich <rich@example.invalid> - 2015-02-03 18:08 +0000

csiph-web