Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use 'find' to locate corrupted files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use 'find' to locate corrupted files
Authored by: johnsawyercjs on Oct 07, '05 03:16:17PM

When I try

$ find . ! -type d -amin -1 -print 2> /dev/null > /tmp/F

...Terminal responds with "Ambiguous output redirect". Any ideas as to what exactly to enter?



[ Reply to This | # ]
Use 'find' to locate corrupted files
Authored by: sjk on Oct 07, '05 03:55:54PM

Sounds like you're using tcsh. Try running it in bash.



[ Reply to This | # ]
Use 'find' to locate corrupted files
Authored by: johnsawyercjs on Oct 08, '05 12:59:10PM

You're right--tcsh is the default. I changed it to bash by entering 'sudo bash', which brought up the 'root#' prompt. Then I entered

$ find . ! -type d -amin -1 -print 2> /dev/null > /tmp/F

several times again, but got nothing--just another root# prompt every time, even though I opened several files and applications just before entering the command string.



[ Reply to This | # ]
Use 'find' to locate corrupted files
Authored by: ChaChi on Oct 08, '05 03:20:42PM

I must've replied to the wrong thread. See my comments below jonsaw.



[ Reply to This | # ]
Use 'find' to locate corrupted files
Authored by: sjk on Oct 09, '05 03:52:48PM

Any output will be in the /tmp/F file. To display it in the current window just remove the "> /tmp/F" redirection from the end of the command line.

Friendly reminder:

Running shell commands as root without understanding what they do puts your system at risk of accidental, unintended side effects or damage. A botched "find" command can be particularly hazardous when it encounters and affects many files.

The example in this hint is benign that way, except you want to be careful with the '>' redirection not writing output to the wrong file(s).



[ Reply to This | # ]