Unix/Linux Go Back    

Find command + replace the extension (.xxx) by *

UNIX for Beginners Questions & Answers

Kindly Note - This is a Single User Post by Forum Member RudiC Regarding:
Find command + replace the extension (.xxx) by *.
Please Follow The Primary Link Above to View the Full Discussion.

Old Unix and Linux 04-21-2017   -   Original Discussion by royinfo.alain
RudiC's Unix or Linux Image
RudiC RudiC is offline Forum Staff  
Join Date: Jul 2012
Last Activity: 16 December 2017, 11:08 AM EST
Location: Aachen, Germany
Posts: 11,815
Thanks: 341
Thanked 3,659 Times in 3,357 Posts
The request seems to be to add a .* to every single file name, have it an extension or not. Try this small adaption to MadeInGermany's proposal:

find * -type f -mtime -365 | sed 's/[.][^.]*$//; s/$/.*/' | sort -u

The Following User Says Thank You to RudiC For This Useful Post:
royinfo.alain (04-21-2017)