@flabbergastedFiltch said in Linux: Finding Files:
Yea, Scott's reply led me to:
find . -name "*\ " -print
Not a big leap.
Now I'm all the way down the rabbit hole of xargs, grep, and perhaps sed (?)
Using FreeBSD on EMC Isilon.
I have to do this a lot, but the creative way users name files is ever changing:
filename.
filename. [filename dot space]
file*name
Here's a sample of a real directory:
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEULIGCONOBL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUBLA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._TIMESEXTBOL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._GILLSANBOL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/GILLSANEXTBOL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVETICA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVETICANEUE3.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUHEACONOBL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUULTLIG.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUROM.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._ZAPFDINGBATS.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVEBOLOBL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVETICANEUE1.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._TIMESBOLITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVETICANEUE2.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEULIGCON.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUBLA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUHEACON.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVETICANEUECONDENSED3.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/GILLSANITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUMEDCONOBL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._TIMESSEMITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUTHI.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVETICANEUE3.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/TIMESBOLITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVETICANEUE1.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/TIMESEXTBOL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUHEACONOBL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUHEAITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/ZAPFDINGBATS.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUULTLIG.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUBLAITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUMEDCON.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/GILLSANLIGITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUHEAITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUTHI.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUHEA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUMEDCONOBL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUBLAITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUHEA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUTHIITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUMEDITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEULIGITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._GILLSANITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._GILLSANEXTBOL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._GILLSANBOLITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEULIGCON.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEULIGITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/TIMESSEMITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVEBOLOBL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUMEDCON.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUMEDITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUBOL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUULTLIGITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/GILLSANLIG.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUULTLIGITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._GILLSANLIG.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVETICA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/GILLSANBOLITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEULIG.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUMED.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._GILLSANLIGITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUHEACON.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUMED.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVETICANEUE2.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEULIGCONOBL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/GILLSANBOL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUTHIITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVETICANEUECONDENSED3.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/._HELVENEUITA.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUBOL.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEULIG.
./WebUploads/FAMILYANDFRIENDS.1/b_Fonts/HELVENEUROM.
One or Two files (even 10) and I'd use mv to rename the files and remove the space or period or add extension, etc... This list represents just one folder out of a few hundred that have some gremlin preventing Windows NT Backup (don't ask) from taking a backup and deleting the originals.
Thanks for the reply and nudge. Now back to it after I change my Job Description on Linkedin to "Frustrated wannabe Software Developer".
As much as I like giant one liners, the best tool for this would be rename.
To remove a period just do
find . -type f -exec rename "." "" {} \;
You don't technically need to use find, but if the files span multiple directories it's easier.