![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to find out pathname from inode number | axes | UNIX for Advanced & Expert Users | 3 | 09-26-2008 06:44 AM |
| display pathname of the login shell | nadman123 | Shell Programming and Scripting | 1 | 04-14-2008 04:15 PM |
| Getting pathname variables with ksh | BCarlson | Shell Programming and Scripting | 7 | 09-16-2005 04:40 AM |
| how to get the last dir from a pathname using IFS | sam2004 | UNIX for Dummies Questions & Answers | 2 | 03-30-2005 07:34 PM |
| cpio restore - relative pathname | sureshy | UNIX for Dummies Questions & Answers | 4 | 08-27-2002 06:28 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
find without pathname
How can I get the results of a find back without the pathname
for example if i do find ../../ -name \*.sql i dont want to see directory/directory/filename.sql I only want to see filename.sql |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Try:
find ../../ -name \*.sql -print | sed 's=.*/==' |
|
#3
|
|||
|
|||
|
Cheers perdarbo. This seems to work.
What exactly is this doing? Are there any shortfalls? |
|
#4
|
||||
|
||||
|
That sed command deletes everything up to the last slash, which is pretty much what you asked for.
There are no "shortfalls" that I know of. As far as I know, it is right on the mark. |
||||
| Google The UNIX and Linux Forums |