Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Unknown Newsgroups: comp.os.linux.misc Subject: list but not dirs? Date: Tue, 27 Jan 2015 08:10:30 +0000 (UTC) Organization: A noiseless patient Spider Lines: 16 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 27 Jan 2015 08:10:30 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="2a5897b984ff1a928cacfa3950f2e950"; logging-data="28716"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gnuM7OZ8uw2C2ioH4zLA5RAwISt1kbDw=" User-Agent: Pan/0.133 (House of Butterflies) Cancel-Lock: sha1:63ynFX1EdnHZ0TNlHkX5gfu6Eh4= Xref: csiph.com comp.os.linux.misc:13494 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 pdf