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 5 Days Ago
RudiC RudiC is online now Forum Staff  
Join Date: Jul 2012
Last Activity: 26 April 2017, 7:31 AM EDT
Location: Aachen, Germany
Posts: 10,686
Thanks: 263
Thanked 3,283 Times in 3,024 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 (4 Days Ago)