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  
Join Date: Jul 2012
Last Activity: 23 August 2017, 3:17 AM EDT
Location: Aachen, Germany
Posts: 11,193
Thanks: 287
Thanked 3,455 Times in 3,182 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)