Regex - match string to find hidden files on linux

Status
Not open for further replies.

office politics

It's all just 1s and 0s
Messages
6,555
Location
in the lab
HELP!

I'm looking to create a regex pattern that produces matches for hidden files on linux.

pattern i think should work
/\\home\\theusr\\\.?

string to match is the following (note the slashes are backslashes, the backups system uses these strings)
/\home\theusr\.hidden
/\home\theusr\.hidden2

but not
/\home\theusr\nothidden.txt


i found these links

Regular Expressions - a Simple User Guide


Senior Advisor - http://www.unix.com
 
I can't. I'm using a backup application that allows regex pattern matching. The goal is to exclude all files except any that are hidden. The dialog box has a check box for negate. So if I enter a regex pattern for the hiddens and check the box for negate, all will be good.

I've tried /\\home\\theusr\\\.*, but it produces a match for all files in the directory.
 
dang it, i turn my head for a couple minutes and look what happens, lol. we came to the same conclusion. /\\home\\theusr\\\..*

good work.
 
Status
Not open for further replies.
Back
Top Bottom