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
RudiC RudiC is offline Forum Staff  
Moderator
 
Join Date: Jul 2012
Last Activity: 16 October 2017, 3:56 PM EDT
Location: Aachen, Germany
Posts: 11,459
Thanks: 307
Thanked 3,552 Times in 3,269 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:

Code:
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)