KrnlPanic's Linux Notes and Tips

Working with linux since kernel version 2.0.30

Recursive directory print relative pathnames for all files

Here’s a quickie for printing the full relative path for all files in the current directory

find . -type f -exec ls {} \; | cut -d'/' -f2-

Here’s an example of the output that you can expect:

[code]
[root@server /home/krnlpanic.com]# find . -type f -exec ls {} \; | cut -d’/’ -f2-
wep/blog-header.php
wep/links-opml.php
wep/includes/version.php
wep/includes/meta.php
wep/includes/ms-blogs.php
wep/includes/theme.php
wep/includes/feed-rss.php
wep/includes/class-wp-walker.php
wep/includes/class-wp-customize-section.php
wep/includes/feed-atom-comments.php
wep/includes/feed-atom.php
wep/includes/shortcodes.php
wep/includes/pomo/mo.php
wep/includes/pomo/entry.php
wep/includes/pomo/po.php
wep/includes/pomo/translations.php
wep/includes/pomo/streams.php
wep/includes/nav-menu-template.php
wep/includes/css/wp-auth-check.min.css
wep/includes/css/editor.css
wep/includes/css/admin-bar.css
wep/includes/css/wp-auth-check.css
wep/includes/css/admin-bar.min.css
wep/includes/css/admin-bar-rtl.css
wep/includes/css/media-views-rtl.css
wep/includes/css/buttons.css
wep/includes/css/admin-bar-rtl.min.css
wep/includes/css/media-views.css
[/code]

Leave a Reply

www.buycheap-pillsonline.com www.buyantibioticshere.com www.ordergenericpropeciaonline.com www.genericpropeciabuyonline.com