Sunday, November 25, 2007

Operating Systems: Searching for temp files

You want to search for all temporary files that were left behind by Microsoft Word.
What filename should you specify in the Search dialog?
1. ~* ----correct----
2. >>*.doc
3. ~.*
4. ~.doc

Explanation : You should use ~* as the filename to locate any temporary files left behind by Microsoft Word or other applications that use a ~ as the first character of a temporary file. The * is a wildcard character that means zero or more characters. So ~* would locate all files that begin with ~.

You should not search on ~.*. Doing so would return only the files named ~ with any file extension. For example, it would find ~.doc and ~.exe, but not ~myfile.doc.

You should not search on *.doc. Doing so would return all files ending in .doc, the extension commonly associated with Microsoft Word documents. Therefore, it would return all Microsoft Word documents, not just the temporary files.

You should not search on ~.doc. Doing so would return only a file specifically named ~.doc if there was one within the search path.
Objective: Operating Systems