*ÊØÍø¤ÊUnix ¥³¥Þ¥ó¥É¥á¥â [#b5fdfef3]

**Ê£¿ô¥Õ¥¡¥¤¥ë¤ÎÉôʬ¥Õ¥¡¥¤¥ë̾¤ÎÊѹ¹ [#f55c78a0]

-rename ¥³¥Þ¥ó¥É¤¬ºÇ¶¯
--MacOS ¤Ç¤Ï¤³¤Î¥³¥Þ¥ó¥É¤ÏÆþ¤Ã¤Æ¤¤¤Ê¤¤¤Î¤Ç Homebrew ·Ðͳ¤Ç¥¤¥ó¥¹¥È¡¼¥ë

 brew install rename

--»È¤¤Êý¤Ï´Êñ

---¥Õ¥¡¥¤¥ë̾¤Î°ìÉô­¢¤ò2¤ËÊѹ¹
 rename 's/­¢/2/' *.txt 

---¤¢¤ë¥Õ¥¡¥¤¥ë̾¤Îʸ¸À¤òºï½ü
 rename 's/ÊÌÆü¼Â»Ü//' *.txt 


**Ê£¿ô¥Õ¥¡¥¤¥ë¤ÎÊ£¿ô²Õ½ê¤«¤é¤Î°ÜÆ° [#d5a1ad42]

 find . -name "Ê£¿ô¥Õ¥©¥ë¥À¤Î grep ¥Ñ¥¿¡¼¥ó" -type f -exec cp {} ¡Ê¥³¥Ô¡¼Àè¡Ë \;
 Î㡧E¤Ç»Ï¤Þ¤ë¤¹¤Ù¤Æ¤Î¥Õ¥©¥ë¥ÀÆâ¤Î¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤ò temp ¤Ë°ÜÆ°
 find . -name "E*" -type f -exec cp {} /temp \;

-¤¢¤ë¥Õ¥¡¥¤¥ë̾¤Î°ìÉô¤ò¸¡º÷¡¦°ì³çÃê½Ð¡¦°ÜÆ°

  find . -type f -name '*➁;.txt' -exec mv -i {} ./tmp  \; 
  find . -type f -name 'GREP_PATTERN' -exec mv -i {} ./tmp  \; 

---'*➁.txt'¤¬Ãµ¤·¤¿¤¤¥Ñ¥¿¥ó¡£¤³¤ì¤Ë¥Þ¥Ã¥Á¤¹¤ë²¼°Ì¥Ç¥£¥ì¥¯¥È¥ê¤Î¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤ò tmp ¤Ë°ÜÆ°
--- find ¤Î¸å¤Î "." ¤Ï current directory ¤Î°ÕÌ£


*** grep ¤¹¤ëɬÍפ¬¤Ê¤¤¾ì¹ç(2022/12) [#c88f50dc]

 find . -mindepth 2 -type f -print -exec mv {} . \;

--¤³¤Î "-mindepth" ¤¬1¤ÏƱ¤¸¥ì¥Ù¥ë¡¢2¤Ï£±¤Ä²¼¡¢¤Ê¤É»ØÄê¤Ç¤­¤ë
--mv ¤ò cp ¤Ë¤¹¤ì¤Ð°ÜÆ°¤Ç¤Ï¤Ê¤¯Ê£¼Ì


**¥Õ¥¡¥¤¥ë³ÈÄ¥»Ò¤Î°ì³çÊÑ´¹ [#l4cad2d7]

 for fname in *; do mv $fname ${fname%}.txt; done
 ºÇ½é¤Î * ¤Ï³ÈÄ¥»Ò¤¬¤Ê¤·¤Î¾ì¹ç
 ²¿¤«¤¹¤Ç¤Ë¤Ä¤¤¤Æ¤¤¤ë¤Î¤Ç¤¢¤ì¤Ð¡¢*.out ¤Ê¤É¤ò»ØÄꤷ¤Æ¤ª¤­¡¢¤½¤Î¼¡¤Î¥³¥Þ¥ó¥É¤ÇÊѹ¹¸å¤Î³ÈÄ¥»Ò¤ò»ØÄꤹ¤ë

¥È¥Ã¥×   ÊÔ½¸ º¹Ê¬ ¥Ð¥Ã¥¯¥¢¥Ã¥× źÉÕ Ê£À½ ̾Á°Êѹ¹ ¥ê¥í¡¼¥É   ¿·µ¬ °ìÍ÷ ñ¸ì¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS