Tag Info

Hot answers tagged

10

dsquery user -stalepwd 60 Returns a list of all users with a password age of 60 days or more.


10

It appears to work by doing this: vbscript site:serverfault.com OR site:stackoverflow.com Of course, this could be a false positive and would require further testing Edit: It definitely works, as demonstrated in the Results Summary: Results 1 - 10 of about 9,080 from serverfault.com OR stackoverflow.com for vbscript. (0.06 seconds)


9

Find does not need an index, and traverses the disk every time you run it. Example $ find / -name "*mynewprogram*" locate and variants need index files, but they work -really- faster. 'locate' is from GNU findutils. 'slocate' was recommended up to etch; it was a more 'secure' version of locate, users will not see files that they do not have acess to. ...


8

I'm assuming you're doing this from a Windows machine to Windows machines. I'd do something quick and dirty like: Machines.TXT COMPUTERNAME-1 COMPUTERNAME-2 COMPUTERNAME-3 Scan-Machines.cmd @echo off if "%1"=="" goto all echo Scanning %~1 dir "\\%~1\c$" /s /a /b > "%~1.txt" goto end :all for /f "delims=" %%i in (Machines.TXT) do call %0 "%%i" :end ...


8

This is what I use: for GUI grepWin: link text for superfast commandline: gsar.exe from link text


7

cat is unnecessary (UUOC!) grep will normally tell you which file the matched line was found in when used like this: grep some_string_here *.xml You can also use the -H switch to always to this: grep -H some_string_here *.xml


7

Per my comment, I don't believe there is an equivalent to the "packages.debian.org" central package archive (with web interface) in CentOS. It's something I think is really missing!


7

I usually chain greps to do this. grep uploaded $file | grep -v 09


7

You can find the version number of a package in your repositories with the yum info command. # yum info rabbitmq-server Available Packages Name : rabbitmq-server Arch : noarch Version : 2.6.1 Release : 1.fc16 Size : 1.1 M Repo : updates Committer : Peter Lemenkov <lemenkov@gmail.com> Committime : Tue Nov 8 ...


7

POSIX grep doesn't have such options, but coreutils grep does. grep -r --include='*.xml' -l foobar . should do it. FreeBSD grep (and OS X) appear to have the same thing, Solaris & AIX lack them AFAICT.


7

You should enable it globally, otherwise you'll be vulnerable to the situation where an attacker modifies the unencrypted form to send all the user data to evilserver.com rather than to the one you want (or, since the attacker is actively listening, modify the form action to use HTTP instead of HTTPS). You may also get into a configuration headache ...


6

GNU grep has the -L option, the inverse of -l. It lists files with no matches. So you can do grep -iL v=spf *.db With a more traditional grep, you can do a -c count and then select the ones that have a count of 0 matches: grep -ic v=spf *.db | grep ':0$' | sed 's/:0$//'


6

Yes, 'this' is included in the list of default stop words. Please see the section titled solr.StopFilterFactory in the docs. Please also see the solr.KeepWordFilterFactory section.


6

You could use grep: grep -rn 'classname' /path/to/source This will also print the line number next to each match. Case insensitive: grep -rin 'classname' /path/to/source Search non-recursively in all cpp files: grep -n 'classname' /path/to/source/*.cpp


6

I use xobni with my desktop Outlook and really like it. I believe Outlook needs to be in cached mode


6

Solr, from the Apache Lucene project. Excerpt from the web site http://lucene.apache.org/solr/ Solr is an open source enterprise search server based on the Lucene Java search library, with XML/HTTP and JSON APIs, hit highlighting, faceted search, caching, replication, a web administration interface and many more features. It runs in a Java servlet ...


6

You query INFORMATION_SCHEMA.TABLES for all the tables then query each table. See http://stackoverflow.com/questions/593746/sql-to-search-the-entire-ms-sql-2000-database-for-a-value for details. JR


5

Looking through the courier imapd docs and my installs of it it doesn't seem to have a cache or index of anything beyond the uids of the messages. Have you looked at dovecot? It looks like you can migrate to it without users noticing. It also has a discussion of how it cache's various bits of information in message database. All that being said, a ...


5

The basename command will give you just the name of the file and not the full path, which you can execute on your found file like this: find . -name filename -exec basename {} \;


5

Do you need to quickly search your filesystem for a string just once? Or is this something you need to do all the time? Because if it's just once, you might as well just use grep -- the time it takes grep to search through everything won't be any slower than the time it takes to build an index. If this is actually something you find yourself doing ...


5

Yes, see the "git grep" command


5

In Powershell, single quotes ' indicates variable expansion should not happen within the string. You should try with the double quotes " instead: Get-QADComputer -NotLoggedOnFor 90 -SearchRoot "doman.name/OU1/$OU2" From the docs: PS C:\> Get-Help about_Quoting ... SINGLE AND DOUBLE-QUOTED STRINGS When you enclose a string in double quotation ...


5

For search volumes of that size, I've used a Google Search Appliance. They can be expensive, but they are very customizable and they do an incredible job of indexing things. As a bonus, it will not only index file shares, but you can point it at web resources as well for indexing.


4

You can set up an SSH tunnel between the 2 machines, and channel your data through it. Or you can use stunnel to setup an SSl tunnel. In both cases, the encryption will be transparent to both machines, both applications will not be aware of it, so no code change required.


4

This behavior is by design. IPv6 is being preferred - so the status of the resource in AAAA terms is determined first. An NXDOMAIN response comes back - so the client figures it needs to append the search path. Note that the ndots remark you've made is correct - but not the whole story. If the ndots number higher than the name being queried (if it were a ...


4

You can use the -v option to grep to invert the match so grep uploaded file | grep -v 09 will do what you want. This finds the lines that contain uploaded which are passed piped into a grep command to ignore lines with 09 in them.


4

This isn't using grep - but anytime I have a need that requires more than a basic grep, I turn to my favorite, sed. Certainly any time I have to chain grep commands together... Use this command to do it: sed -n '/09/d; /uploaded/p' file Just one single command (not two).


4

find dir1 -name '*.mp3' -print will do it. -name and -iname are case-sensitive and case-insensitive matches for find.


4

I guess you mean to look for attribute uid or mail (not filtering on those). It is not possible, straight away, to use 2 different attributes in the LDAP URL, although RFC 2255 allows for it. mod_authnz_ldap alone: not possible Apache mod_authnz_ldap documentation states the URL must be like: ldap://host:port/basedn?attribute?scope?filter with ...



Only top voted, non community-wiki answers of a minimum length are eligible