Discussion about this post

User's avatar
videogame-hacker's avatar

$ touch '--no-preserve-root / foo' 'foo'

$ rm $(ls | grep foo)

Expand full comment
@FranckPachot's avatar

I've never used xargs. And I usually need to put it in a list that I'll read several times, like:

```

list=$(whatever) && fuser $list || rm -- $list

```

or

```

for i in $(whatever) ; do fuser "$i" || rm -- "$i" ; done

```

for example to be sure that there's no open files there (I work with databases)

Expand full comment
21 more comments...

No posts