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


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

list but not dirs?

From Unknown <dog@gmail.com>
Newsgroups comp.os.linux.misc
Subject list but not dirs?
Date 2015-01-27 08:10 +0000
Organization A noiseless patient Spider
Message-ID <pan.2015.01.27.08.20.10@gmail.com> (permalink)

Show all headers | View raw


This must be one of the most fundamental commands !!

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"
for Dirs in `lsof | grep cwd | awk '{print $9}' | sort| uniq`; do 
  echo "In Dir: " $Dirs;
# if [ -f "$Dirs/*$1" ]; then ?! Can't test BEFORE listing !!
  ls   $Dirs/*$1; 
  echo "<><><><><>"; 
done
-----
But don't list any <sub-dir>pdf

Back to comp.os.linux.misc | Previous | NextNext 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