Re: Directory name problem...

Brandon S. Allbery KF8NH (allbery@kf8nh.apk.net)
Sun, 25 Oct 1998 11:28:12 -0500


In message <Pine.LNX.4.02.9810251211360.13304-100000@t-rex.wesleyan.edu>,
Joe w
rites:
+-----
| 0 6 * * * find / -name core -exec rm {} ';'
+--->8

What will you do if there is ever a /dev/core? Or some legitimate
application which wants to call its control AF_UNIX socket `core' (granting
that that's a silly thing to call it, but app vendors often seem to be
rather silly anyway)?

It's stupid to do something like the above without using `-type f'. Core
files cannot be directories, or sockets, or device files.

(It also means you can't symlink core to /dev/null, a common trick on public
FTP servers... although `ulimit -c 0' is probably preferable.)

-- 
brandon s. allbery	[os/2][linux][solaris][japh]	 allbery@kf8nh.apk.net
system administrator	     [WAY too many hats]	   allbery@ece.cmu.edu
electrical and computer engineering					 KF8NH
carnegie mellon university

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/