GNU findutils includes find, xargs, locate and updatedb. These tools proivide ways to search for files on your system by specifying what kind of file you're looking for.


Ratings & Reviews

Community Rating
4.5/5.0

Based on 38 user ratings.

Your Rating

Click to rate this project.

about 1 month ago Avatar
find and xargs

    by denilsonsa

'find' is a great tool, really powerful and useful.

'xargs', however, looks like a promising tool but I rarely use it because it is cumbersome to use. Basically, since the default behavior reads items separated by whitespace, 'xargs' is very difficult to use with filenames that might contain spaces. I know there must be some set of parameters to fix this, but then its use becomes less straightforward. Even the manpage recognizes this: ... [More] "Because Unix filenames can contain blanks and newlines, this default behaviour is often problematic"

For this reason, I've never used xargs in years.

If I need to run something for multiple files, I do this (in bash):

for a in * ; do something "$a" ; done

Which is easier to read and to write (although slightly verbose).

Another option is this:

some | commands | here | while read a ; do something "$a" ; done

Finally, I can also just use the -exec parameter from 'find'. [Less]

Was this review helpful to you? |

Links

No links submitted so far. Submit your own links.


Who uses GNU findutils?

Anon32 Anon32 Anon32 Anon32 Anon32 Anon32 Anon32 Anon32 Anon32 Anon32 Anon32 Anon32

Who contributes to GNU findutils?

Anon32 Anon32 Anon32
I'm a contributor

Where in the world?



Related Projects by Tags

Bash, Gawk, ldapsh, Zabbix, zsh



Project Cost

This calculator estimates how much it would cost to hire a team to write this project from scratch. More »
Include
Codebase 14,728
Effort (est.) 3 Person Years
Avg. Salary $ year
$ 185,329