The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
create PATH from find command output rein UNIX for Dummies Questions & Answers 3 04-01-2008 04:35 AM
Is there any way to make up arrow show last command in CSh? sayeo Shell Programming and Scripting 5 03-22-2008 07:33 AM
command to find the path of a file abhilashnair UNIX for Dummies Questions & Answers 3 02-17-2008 03:15 PM
how to use find commnad to show only path of the result umen UNIX for Dummies Questions & Answers 1 02-04-2008 11:22 PM
Show path name p.vvugt UNIX for Dummies Questions & Answers 2 12-19-2007 01:11 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-30-2004
Registered User
 

Join Date: May 2004
Posts: 45
Stumble this Post!
How would I make a find command NOT show the path of a file?

When I do

find . -name "*.txt" -size +0 -exec ls {} \;

I get something like

./lpi_stdout.txt
./lpi_stderr.txt

What would I need to do or pipe it into to strip off those first two characters so I just get

lpi_stdout.txt
lpi_stderr.txt

?

Thanks for the help!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-01-2004
google's Avatar
Moderator
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
Stumble this Post!
try adding a -1 to the ls argument.

Code:
find . -name "*.txt" -size +0 -exec ls -1 {} \;
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:31 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0