find
學這三個指令之前,還是要先來個開胃菜,學一下
find
指令:
find /etc/ -name *.txt # 查找etc下面所有的txt檔案
find /etc/ -name feed -type f # 查找feed檔案,-type 後面跟d ,查找feed目錄
find tests/ -name uu -exec cp {} tests/gg \; # -exec效果更強大,直接找到uu,并且複制到後面的路徑為gg,後面可以加各種操作,這裡隻是示範cp