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


Click here to return to the 'Don't need to change directories' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Don't need to change directories
Authored by: SeanAhern on Nov 18, '02 07:32:18PM
You don't need to "cd" before running a "find" command. That's what the first argument is for. The previous commands, refactored as one command:
    % find /Volumes/Windows_Drive_Name -name "._*" -exec rm '{}' \; -print


[ Reply to This | # ]
Don't need to change directories
Authored by: mert on Nov 18, '02 09:12:56PM

Change "-exec" to "-ok" for make find ask before allowing the "rm" (or whatever command you wanted run). From the find man page:
"The -ok primary is identical to the -exec primary with the exception that find requests user affirmation for the execution of the utility by printing a message to the terminal and reading a response. If the response is other than ``y'' the command is not executed and the value of the -ok expression is false."



[ Reply to This | # ]