Skip to content

Commands to search filenames on Linux by using grep: For trying to find filenames that might cause issues

License

Notifications You must be signed in to change notification settings

mendel5/grep-filenames-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

grep-filenames-linux

You cannot use the following characters anywhere in a site name,
in a subsite name, or in a site or Active Directory group name:

Tilde (~)
Number sign (#)
Percent (%)
Ampersand (&)
Asterisk (*)
Braces ({ })
Backslash (\)
Colon (:)
Angle brackets (< >)
Question mark (?)
Slash (/)
Plus sign (+)
Pipe (|)
Quotation mark (“)

---

Very strict (Whitelist):
find . -type f | grep -i '[^a-z0-9\.\/_ ,()\-]'

Very strict (Blacklist):
find . -name '*[~#%&*()\[\]{}/\\:<>?+|"!§$=]*'

Very strict (Blacklist):
find . -name '*[~#%&*\[\]{}/\\:<>?|"!§$=]*'
missing ()+ compared to above

Quite strict:
find . -name '*[~#%&*()\[\]{}/\\:<>?+|"]*'

Relatively strict:
find . -name '*[~#%*{}/\\:<>?|"]*'
missing &()[]+ compared to above

Microsoft naming conventions:
find . -name '*[<>:"/\\|?*~#$]*'


To check:
!"§$%&/()[]{}=?\+*~#'|<>

Links:

About

Commands to search filenames on Linux by using grep: For trying to find filenames that might cause issues

Topics

Resources

License

Stars

Watchers

Forks