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 08:33 AM
command to find the path of a file abhilashnair UNIX for Dummies Questions & Answers 3 02-17-2008 04:15 PM
how to use find commnad to show only path of the result umen UNIX for Dummies Questions & Answers 1 02-05-2008 12:22 AM
Show path name p.vvugt UNIX for Dummies Questions & Answers 2 12-19-2007 02:11 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 09-30-2004
Registered User
 

Join Date: May 2004
Posts: 45
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  
Old 10-01-2004
google's Avatar
Moderator
 

Join Date: Jul 2002
Location: Atlanta
Posts: 740
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 Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:04 PM.


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

Content Relevant URLs by vBSEO 3.2.0