Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google site



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-30-2004
LordJezo
Guest
 

Posts: n/a
Bits: 0 [Banking]
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!
Sponsored Links
  #2 (permalink)  
Old 10-01-2004
google's Avatar
google google is offline Forum Advisor  
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 {} \;

Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


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 08:35 AM
Is there any way to make up arrow show last command in CSh? sayeo Shell Programming and Scripting 5 03-22-2008 11:33 AM
command to find the path of a file abhilashnair UNIX for Dummies Questions & Answers 3 02-17-2008 07:15 PM
how to use find commnad to show only path of the result umen UNIX for Dummies Questions & Answers 1 02-05-2008 03:22 AM
Show path name p.vvugt UNIX for Dummies Questions & Answers 2 12-19-2007 05:11 AM



All times are GMT -4. The time now is 03:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0