FIND(1)	UNIX¥³¥Þ¥ó¥É	FIND(1)

¡ÎÌ¾Á°¡Ï
FIND - ¥Õ¥¡¥¤¥ë¤Î¸¡º÷
¡Î·Á¼°¡Ï
find pathname-list expression
¡Îµ¡Ç½ÀâÌÀ¡Ï
find¤Ïpathname-list¤Î³Æ¥Ñ¥¹Ì¾¤Ë¤Ä¤¤¤Æ¥Ç¥£¥ì¥¯¥È¥ê³¬ÁØ¤òºÆµ¢Åª¤Ë²¼¹ß¤·¡¢°Ê²¼¤Ë¼¨¤¹±é»»»Ò¤Ç½ñ¤«¤ì¤¿ÏÀÍý¼°expression¤È°ìÃ×¤¹¤ë¥Õ¥¡¥¤¥ë¤òÃµ¤·¤Þ¤¹¡£¤³¤³¤Ç¤ÎÀâÌÀ¤Ç¤Ï¡¢°ú¿ô n ¤Ï10¿ÊÀ°¿ô¤È¤·¤Æ»ÈÍÑ¤µ¤ì¤Æ¤ª¤ê+n¤Ïn¤è¤êÂç¤­¤¤ÃÍ¡¢-n¤Ïn¤è¤ê¾®¤µ¤¤ÃÍ¡¢n¤Ïn¤½¤Î¤â¤Î¤ò°ÕÌ£¤·¤Þ¤¹¡£

-fstype type
¥Õ¥¡¥¤¥ë¤¬Â°¤¹¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤¬¡¢»ØÄê¤µ¤ì¤¿¥¿¥¤¥×type¤Ç¤¢¤ë¾ì¹ç¤Ë¿¿¡£type¤ÏÄÌ¾ï4.3¤Þ¤¿¤Ïnfs¤Ç¤¹¡£

-name filename
»ØÄê¤·¤¿°ú¿ô¤¬¸½ºß¤Î¥Õ¥¡¥¤¥ëÌ¾¤Ë°ìÃ×¤¹¤ë¾ì¹ç¤Ï¿¿¡£¥¨¥¹¥±¡¼¥×¤ò»ÈÍÑ¤¹¤ë¤È¥·¥§¥ë°ú¿ô¹½Ê¸¤ò»ØÄê¤Ç¤­¤Þ¤¹¡£([¡¢?¡¢*¤ËÃí°Õ)

-perm onum
¥Õ¥¡¥¤¥ë¤Îµö²Ä¥Õ¥é¥°¤¬»ØÄê¤·¤¿8¿Ê¿ôonum¤Ë°ìÃ×¤¹¤ë¾ì¹ç¤Ë¿¿(chmod(1v)¤ò»²¾È)¡£onum¤ÎÁ°¤ËÉéÉä¹æ¤òÆþ¤ì¤ë¤È¡¢¤è¤êÂ¿¤¯¤Î¥Õ¥é¥°¥Ó¥Ã¥È(017777¡¢chmod(1v)¤ò»²¾È)¤¬°ÕÌ£¿¼¤¯¤Ê¤ê¥Õ¥é¥°¤¬Èæ³Ó¤µ¤ì¤Þ¤¹¡£(flag & onum) == onum

-prune	
¾ï¤Ë¿¿¡£¥Õ¥¡¥¤¥ë¤Î¸¡º÷½üµî¤¹¤ëÉûºîÍÑ¤¬¤¢¤ê¤Þ¤¹¡£¸½ºß¤Î¥Ñ¥¹Ì¾¤¬¥Ç¥£¥ì¥¯¥È¥ê¤Î¾ì¹ç¤Ï¡¢find¤Ï¤½¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë²¼¹ß¤·¤Þ¤»¤ó¡£

-type c
¥Õ¥¡¥¤¥ë¤Î¥¿¥¤¥×¤¬c¤Ç¤¢¤ë»þ¤Ë¿¿¡£¤³¤³¤Çc¤Ï¼¡¤Î¤¤¤º¤ì¤«¤Ç¤¹¡£
b		¥Ö¥í¥Ã¥¯ÆÃ¼ì¥Õ¥¡¥¤¥ë
c		¥­¥ã¥é¥¯¥¿ÆÃ¼ì¥Õ¥¡¥¤¥ë
d		¥Ç¥£¥ì¥¯¥È¥ê
f		ÉáÄÌ¤Î¥Õ¥¡¥¤¥ë
p		»ØÄê¤µ¤ì¤¿¥Ñ¥¤¥×(FIFO)
l		¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯
s		¥½¥±¥Ã¥È

-link n
¥Õ¥¡¥¤¥ë¤Ën¸Ä¤Î¥ê¥ó¥¯¤¬¤¢¤ë»þ¤Ë¿¿¡£

-user uname
¥Õ¥¡¥¤¥ë¤¬¥æ¡¼¥¶uname¤ËÂ°¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¿¿¡£¤â¤·uname¤¬¿ôÃÍ¤Çpasswd(5)¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤Ê¤¤¾ì¹ç¡¢¤½¤ì¤Ï¥æ¡¼¥¶ID¤È¤ß¤Ê¤µ¤ì¤Þ¤¹¡£

-nouser
¥Õ¥¡¥¤¥ë¤¬passwd¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤Ê¤¤¥æ¡¼¥¶¤ËÂ°¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¿¿¡£

-group gname
¥Õ¥¡¥¤¥ë¤¬¥°¥ë¡¼¥×gname¤ËÂ°¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¿¿¡£¤â¤·gname¤¬¿ôÃÍ¤Çgroup(5)¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤Ê¤¤¾ì¹ç¡¢¤½¤ì¤Ï¥°¥ë¡¼¥×ID¤È¤ß¤Ê¤µ¤ì¤Þ¤¹¡£

-nogroup
¥Õ¥¡¥¤¥ë¤¬group¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤Ê¤¤¥°¥ë¡¼¥×¤ËÂ°¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¿¿¡£

-size n
¥Õ¥¡¥¤¥ë¥µ¥¤¥º¤¬n¥Ö¥í¥Ã¥¯¤Ç¤¢¤ë¾ì¹ç¤Ë¿¿¡£¡Ê1¥Ö¥í¥Ã¥¯512¥Ð¥¤¥È¡Ën¤Î¸å¤Ëc¤¬¤Ä¤¯¤È¥µ¥¤¥º¤Ï¥Ð¥¤¥ÈÃ±°Ì¤È¤ß¤Ê¤µ¤ì¤Þ¤¹¡£

-inum n
¥Õ¥¡¥¤¥ë¤¬inode NO n¤ò»ý¤Ä¾ì¹ç¤Ë¿¿¡£

-atime n
¥Õ¥¡¥¤¥ë¤¬nÆü°ÊÆâ¤Ë¥¢¥¯¥»¥¹¤µ¤ì¤¿¾ì¹ç¤Ë¿¿¡£pathname-listÃæ¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ÎºÇ½ª¥¢¥¯¥»¥¹»þ¹ï¤Ïfind¼«¿È¤Ë¤è¤Ã¤Æ¹¹¿·¤µ¤ì¤Þ¤¹¡£

-mtime n
¥Õ¥¡¥¤¥ë¤ÎÃæ¿È¤¬nÆü°ÊÆâ¤Ë½¤Àµ¤µ¤ì¤¿¾ì¹ç¤Ë¿¿¡£

-ctime n
¥Õ¥¡¥¤¥ë¤ÎÃæ¿È¤¬nÆü°ÊÆâ¤ËÊÑ¹¹¤µ¤ì¤¿¾ì¹ç¤Ë¿¿¡£¤³¤³¤Ç¤¤¤¦ÊÑ¹¹¤È¤Ï¡¢¥Õ¥¡¥¤¥ë¤ÎÃæ¿È¤¬½¤Àµ¤µ¤ì¥Õ¥¡¥¤¥ë¤ÎÂ°À­¡Ê¥ª¡¼¥Ê¡¼¡¢¥°¥ë¡¼¥×¡¢¥ê¥ó¥¯¿ôÅù¡Ë¤¬ÊÑ¹¹¤µ¤ì¤¿¾ì¹ç¤â´Þ¤ß¤Þ¤¹¡£

-exec command
»ØÄê¤·¤¿command¤ò¼Â¹Ô¤·¡¢¤½¤Î½ªÎ»¥¹¥Æ¡¼¥¿¥¹¤È¤·¤Æ¥¼¥í¤¬ÊÖ¤Ã¤¿¾ì¹ç¤Ë¤Ï¿¿¡£command¤Î½ª¤ï¤ê¤Ë¤Ï¥¨¥¹¥±¡¼¥×¤·¤¿¥»¥ß¥³¥í¥ó¤Ç¶èÀÚ¤ê¤Þ¤¹¡£¥³¥Þ¥ó¥É°ú¿ô{}¤Ï¡¢¸½ºß¤Î¥Ñ¥¹Ì¾¤ËÃÖ¤­´¹¤¨¤é¤ì¤Þ¤¹¡£

-ok command
exec¤È»÷¤Æ¤¤¤Þ¤¹¤¬À¸À®¤µ¤ì¤¿¥³¥Þ¥ó¥É¤òÉ¸½à½ÐÎÏ¤Ë½ñ¤­¤À¤·¡¢É¸½àÆþÎÏ¤òÆÉ¤ß¼è¤ê¡¢¥æ¡¼¥¶¤¬y¤òÆþÎÏ¤·¤¿»þ¤Î¤ß¼Â¹Ô¤µ¤ì¤Þ¤¹¡£

-print	
¾ï¤Ë¿¿¡£¸½ºß¤Î¥Ñ¥¹Ì¾¤ò½ÐÎÏ¤·¤Þ¤¹¡£

-ls
¾ï¤Ë¿¿¡£¸½ºß¤Î¥Ñ¥¹Ì¾¤ò´ØÏ¢¤¹¤ëÅý·×¤â´Þ¤á¤Æ½ÐÎÏ¤·¤Þ¤¹¡£¤³¤ÎÃæ¤Ë¤Ïinode NO¡¢¥­¥í¥Ð¥¤¥È¡Ê1024¥Ð¥¤¥È¡ËÃ±°Ì¤Î¥µ¥¤¥º¡¢¥×¥í¥Æ¥¯¥·¥ç¥ó¥â¡¼¥É¡¢¥Ï¡¼¥É¥ê¥ó¥¯¿ô¡¢¥æ¡¼¥¶¡¢¥°¥ë¡¼¥×¡¢¥µ¥¤¥º¡Ê¥Ð¥¤¥È¡Ë¡¢½¤ÀµÆü»þ¤¬´Þ¤Þ¤ì¤Þ¤¹¡£¥Õ¥¡¥¤¥ë¤ÀÆÃ¼ì¥Õ¥¡¥¤¥ë¤Î¾ì¹ç¤Ï¡¢¥µ¥¤¥º¡¢¥Õ¥£¡¼¥ë¥É¤Ï¥á¥¸¥ã¡¼µÚ¤Ó¥Þ¥¤¥Ê¡¼ÁõÃÖÈÖ¹æ¤ò´Þ¤ß¤Þ¤¹¡£¥Õ¥¡¥¤¥ë¤¬¥·¥ó¥Ü¥ê¥Ã¥¯¤ê¤ó¤¯¤ò»ý¤Ä¾ì¹ç¥ê¥ó¥¯¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹Ì¾h¤Ï``->''¤Î¸å¤Ë½ÐÎÏ¤µ¤ì¤Þ¤¹¡£¥Õ¥©¡¼¥Þ¥Ã¥È¤Ï``ls -gilds''¤ÈÆ±¤¸¤Ç¤¹¡£¡ÊÃí¡¨¥Õ¥©¡¼¥Þ¥Ã¥Æ¥£¥ó¥°¤Ïls¤Î¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤¹¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢ÆâÉôÅª¤Ë¤ª¤³¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¡Ë

-cpio device
¾ï¤Ë¿¿¡£¸½ºß¤Î¥Õ¥¡¥¤¥ë¤òcpio(4)¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¡Ê5120¥Ð¥¤¥È¥ì¥³¡¼¥É¡Ë¤Çdevice¤Ë½ñ¤­¹þ¤ß¤Þ¤¹¡£

-ncpio device
¾ï¤Ë¿¿¡£¸½ºß¤Î¥Õ¥¡¥¤¥ë¤òcpio -c(4)¤Î¥Õ¥©¡¼¥Þ¥Ã¥È¡Ê5120¥Ð¥¤¥È¥ì¥³¡¼¥É¡Ë¤Çdevice¤Ë½ñ¤­¹þ¤ß¤Þ¤¹¡£

-newer file
¸½ºß¤Î¥Õ¥¡¥¤¥ë¤¬°ú¿ô¤Î¥Õ¥¡¥¤¥ë¤è¤ê¤â¸å¤Ç½¤Àµ¤µ¤ì¤¿¾ì¹ç¤Ï¿¿¡£

-xdev
¾ï¤Ë¿¿¡£¥Õ¥¡¥¤¥ë¤Ï¸½ºß¤Î°ú¿ô¥Ñ¥¹Ì¾¤¬¤¢¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤È°Û¤Ê¤ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë¤ÏÁ÷¤é¤ì¤Þ¤»¤ó¡£

-depth
¾ï¤Ë¿¿¡£¥Ç¥£¥ì¥¯¥È¥êÃæ¤ÎÁ´¥¨¥ó¥È¥ê¤ò¥Ç¥£¥ì¥¯¥È¥ê¼«¿È¤è¤êÀè¤ËÄ´¤Ù¤ëÊý¼°¤Ç³¬ÁØ¤ò²¼¹ß¤µ¤»¤Þ¤¹¡£¤³¤Î¼°¤Ï¡¢½ñ¤­¹þ¤ßµö²Ä¤Î¤Ê¤¤¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¥Õ¥¡¥¤¥ë¤òÅ¾Á÷¤¹¤ë°Ù¤Ëcpio(1)¤È¤È¤â¤Ë»ÈÍÑ¤¹¤ë¤ÈÊØÍø¤Ç¤¹¡£

( expression )
¤«¤Ã¤³¤Ç°Ï¤ó¤À¼°¤¬¿¿¤Ç¤¢¤ë¾ì¹ç¤Ë¤Ï¿¿¡£¡Ê¤«¤Ã¤³¤Ï¥·¥§¥ë¤Ë¤È¤Ã¤ÆÆÃÊÌ¤Ê°ÕÌ£¤ò»ý¤Ä¤Î¤Ç¥¨¥¹¥±¡¼¥×¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£¡Ë

!primary
primary¤¬µ¶¤Ç¤¢¤ë¾ì¹ç¤Ë¿¿¡£¡Ê'!'¤ÏÃ±¹ÔÈÝÄê±é»»»Ò¡Ë

primary1 [-a] primary2
primary1¡¢primary2¤ÎÎ¾Êý¤¬¿¿¤Ç¤¢¤ë»þ¤Ë¿¿¡£-a¤Ï¾ÊÎ¬¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£2¤Ä¤Îprimary¤òÊÂ¤Ù¤Æµ­½Ò¤¹¤ë¤³¤È¤Ë¤è¤êÎ»¾µ¤µ¤ì¤Þ¤¹¡£

primary1 -o primary2
primary1¡¢primary2¤Î¤¤¤º¤ì¤«¤¬¿¿¤Ç¤¢¤ë»þ¤Ë¿¿¡£¡Ê-o¤Ïor±é»»»Ò¡Ë
	
¡ÎÆüËÜ¸ìµ¡Ç½¡Ï
find¤Ï¡¢pathname-list¡¢¥Õ¥¡¥¤¥ëÌ¾¡¢µÚ¤Ó¥³¥Þ¥ó¥É¹Ô¤Î°ú¿ô¤ËEUCÊ¸»ú¤ò´Þ¤à¤³¤È¤¬½ÐÍè¤Þ¤¹¡£¤¿¤À¤·¡¢À°¿ô¤Î°ú¿ô¡¢ÆÃ¼ìÊ¸»ú¤ÏASCIIÊ¸»ú¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

¡Î»ÈÍÑÎã¡Ï
Åö¼Ò¤Î³«È¯´Ä¶­¤Ç¤Ï¥Õ¥¡¥¤¥ëTIMESTAMP¤ò¤¹¤Ù¤Æ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î²¼¤ËÃÖ¤¤¤Æ¤¢¤ê¤Þ¤¹¡£TIMESTAMP¤òºîÀ®¤·¤¿¡¢¸å¹¹¿·¤µ¤ì¤¿¤¹¤Ù¤Æ¤Î¥¨¥ó¥È¥ê¤ò¸«¤Ä¤±¤ëÊýË¡¤ò¼¨¤·¤Þ¤¹¡£

	angel% find /usr/man/man2 -newer /usr/man/man2/TIMESTAMP -print
	/usr/man/man2
	/usr/man/man2/socket.2
	angel%

intro.ms¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤ò¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê°Ê²¼¤«¤éÃµ¤¹ÊýË¡¤ò¼¨¤·¤Þ¤¹¡£

	angel% find . -name intoro.ms -print
	./manuals/assembler/intro.ms
	./manuals/sun.core/intro.ms
	./manuals/driver.tut/intro.ms
	./manuals/sys.manager/uucp.impl/intro.mss
	./supplements/general.works/unix.introduction/intro.mss
	./supplements/programing.tools/sccs/intro.mss
	angel%

SCCS¥Ç¥£¥ì¥¯¥È¥ê¤ò¥¹¥­¥Ã¥×¤·¤Æ¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê°Ê¹ß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î¥Õ¥¡¥¤¥ë¤òºÆµ¢Åª¤ËÉ½¼¨¤¹¤ë¤Ë¤Ï¼¡¤Î¤è¤¦¤Ë»ØÄê¤·¤Þ¤¹¡£

	angel% find . -name SCCS -prune -o -print
	angel%

SCCS¥Ç¥£¥ì¥¯¥È¥ê¤ò¥¹¥­¥Ã¥×¤¹¤ë¤¬¡¢SCCS¥Ç¥£¥ì¥¯¥È¥êÌ¾¤Ï½ÐÎÏ¤·¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê°Ê¹ß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î¥Õ¥¡¥¤¥ë¤òºÆµ¢Åª¤ËÉ½¼¨¤¹¤ë¤Ë¤Ï¼¡¤Î¤è¤¦¤Ë»ØÄê¤·¤Þ¤¹¡£

	angel% find . -print -name SCCS -prune
	angel%

¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê°Ê²¼¤Ë¤¢¤ëa.out¤Þ¤¿¤Ï*.o¤Ç1½µ´Ö¥¢¥¯¥»¥¹¤¬¤Ê¤¯¡¢¤«¤Änfs¥Þ¥¦¥ó¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤â¤Î¤òºï½ü¤¹¤ë¤Ë¤Ï¼¡¤Î¤è¤¦¤Ë»ØÄê¤·¤Þ¤¹¡£

	angel% cd
	angel% find . \( -name a.out -o -name '*.o' \) -atime +7 -exec rm {} \; -o -fstype nfs -prune

¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê°Ê²¼¤è¤ê'´Á¤¢»ú'¡¢'´Á¤¤»ú'¡¢'´Á¤¦»ú'...Åù¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤òÉ½¼¨¤·¤¿¤¤»þ¤Ï°Ê²¼¤Î¤è¤¦¤Ë»ØÄê¤·¤Þ¤¹¡£

	angel% find . -name ´Á\[¤¢¤¤¤¦¤¨¤ª\]»ú -print
	./´Á¤¢»ú
	./´Á»ú/´Á¤¤»ú
	./´Á»ú/´Á¤¦»ú
	angel%

¡Î´ØÏ¢¹àÌÜ¡Ï
chmod(1V), cpio(1), sh(1), test(1V), cpio(5), fs(5), netinfo(5)