請問 find 排除某些檔案的方式 - Linux

By Donna
at 2017-06-30T02:59
at 2017-06-30T02:59
Table of Contents
小弟想要每日刪除在/opt/123/log 內的所有檔案,但是要排除連結指向的檔案...
以下是目錄底下的資料:
/opt/123/log/aaa.ERROR -> ERROR20170622-091436.1204
/opt/123/log/aaa.WARNING -> ERROR20170622-211432.4204
/opt/123/log/aaa.INFO -> INFO20170622-221431.1927
/opt/123/log/bbb.ERROR -> ERROR20170622-091432.1477
/opt/123/log/bbb.WARNING -> ERROR20170622-111432.8437
/opt/123/log/bbb.INFO -> INFO20170622-091438.1277
其餘還有一大堆類似的檔案,上面六個檔案檔名會變動也不能搬移 = =
有方法可以寫 shell script 用 find 排除某些特定檔案一次殺光其他檔案嗎??
感恩~
--
(。 。) (。 。) (。 。) (。 。)
︴︴︴︴ ︴︴︴︴ ︴︴︴︴ ︴︴︴︴
(。 。) (。 。) (。 。) (。 。)
︴︴︴︴ ︴︴︴︴ ︴︴︴︴ ︴︴︴︴
(。 。) (。 。) (。 。) (。 。)
︴︴︴︴ ︴︴︴︴ ︴︴︴︴ ︴︴︴︴
--
Tags:
Linux
All Comments

By Hazel
at 2017-07-01T23:24
at 2017-07-01T23:24

By Ophelia
at 2017-07-03T06:54
at 2017-07-03T06:54

By Olive
at 2017-07-04T21:51
at 2017-07-04T21:51

By Andy
at 2017-07-08T09:20
at 2017-07-08T09:20

By Kumar
at 2017-07-11T17:49
at 2017-07-11T17:49
Related Posts
使用Gnome-terminal,如何儲存記錄檔?

By Catherine
at 2017-06-28T14:51
at 2017-06-28T14:51
CentOS(1611)安裝時GPT設定

By Christine
at 2017-06-28T10:20
at 2017-06-28T10:20
hwclock設定時間

By Kama
at 2017-06-28T09:01
at 2017-06-28T09:01
關於MySQL跟mariaDB雙向同步問題

By Liam
at 2017-06-28T08:50
at 2017-06-28T08:50
登入輸入密碼 跳回登入畫面

By Donna
at 2017-06-27T04:45
at 2017-06-27T04:45