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

-i place the argument in th elocation of the . Usually the string is a set of braces {}. So in the command you replace the braces {} with the argument.

example:
find -mtime +60 -maxdepth 1 | xargs -i mov {} {}.old

and i understand what the command does, rename files older than 60 days to a .old name. and i understand how to use -exec and -ok flags on xargs with the {} \; syntax at the end but i just can't get what this -i flag exactly is doing.

2007-01-30 02:40:14 · 1 answers · asked by Sufi 7 in Computers & Internet Programming & Design

1 answers

Each filename 'find' finds is passed to 'xargs' as a parameter. The -i option takes this parameter (the filename) and wherever xargs encounters {} replaces it with the argument (the filename).

2007-01-30 02:55:40 · answer #1 · answered by Anonymous · 0 0

fedest.com, questions and answers