English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1. To find all the files and folders created in past 24 hours.

2. To modify egrep command so that it takes multile inputs.

2006-09-03 07:28:00 · 4 answers · asked by benam 1 in Computers & Internet Programming & Design

i want egrep to search multiple patterns

2006-09-03 07:43:00 · update #1

4 answers

I assume this is a *NIX operating system, right?

The first would be would be:
find -ctime -1

The second, just give it a comma-delimited list, IIIRC. Might not even need commas.

2006-09-03 07:40:15 · answer #1 · answered by flipturn2001 2 · 0 0

1. use "find", and read the man page for the options about create/modified dates for files (actually in Unix I think there are 3 kinds of dates, on a file, but read the manual for your system).

2. perhaps you could just "cat" the 3 files one by one, into a pipe, and have egrep read from stdin.

2006-09-03 14:41:34 · answer #2 · answered by ckk 2 · 0 1

find . -ctime -24

egrep - like most unix commands - takes a list of files
as inputs, so I'm not clear on what you are asking for:

egrep 'expr1|expr2|expr3' file1 file 2 *.files

2006-09-03 14:38:37 · answer #3 · answered by PourOneForMe 2 · 0 0

You can use find command with -atime option to print file names..

find . -type f -atime +7 -print

try following..

man find

2006-09-03 14:34:41 · answer #4 · answered by raghu nayak 1 · 0 0

fedest.com, questions and answers