I want to find all html
files and only show the file names, not the full file path, what I tried:
find /home/irakli/Desktop/irakli_linux -print | grep -i '.*[.]html'
Results:
/home/irakli/Desktop/irakli_linux/htmll/10.html
/home/irakli/Desktop/irakli_linux/htmll/11.html
/home/irakli/Desktop/irakli_linux/htmll/12.html
/home/irakli/Desktop/irakli_linux/htmll/13.html
/home/irakli/Desktop/irakli_linux/htmll/14.html
/home/irakli/Desktop/irakli_linux/htmll/15.html
I only want 1.html 2.html
...
find
in general. – PerlDuck Dec 30 '18 at 11:56find
has, so hopefully that covers it. Alternatively, https://askubuntu.com/a/651321/295286 would probably be a more appropriate, and it pretty much same question in the title. Feel free to vote on reopening, though. – Sergiy Kolodyazhnyy Dec 30 '18 at 12:01command-line
gold :) This seems more of a duplicate for printing basename only? – WinEunuuchs2Unix Dec 30 '18 at 14:46command-line
gold for about 2-3 years now. Check the list of duplicates to this post - there's two, How do you output the filename in find command while using -exec? addresses that issue. – Sergiy Kolodyazhnyy Dec 30 '18 at 22:53