From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11477 invoked by alias); 25 Dec 2016 22:49:53 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22280 Received: (qmail 17866 invoked from network); 25 Dec 2016 22:49:53 -0000 X-Qmail-Scanner-Diagnostics: from pv33p36im-asmtp002.me.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(17.142.213.63):SA:0(-4.5/5.0):. Processed in 0.960391 secs); 25 Dec 2016 22:49:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.5 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,RP_MATCHES_RCVD,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: akhst7@me.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at me.com designates 17.142.213.63 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=4d515a; t=1482702586; bh=bvHABVF2auoloj6ssKZt/19wDAU2Ds153cAW5SfK1zw=; h=Content-type:MIME-version:Subject:From:Date:Message-id:To; b=YvG3IHuaiEmIeqAN+ftZKXeiMZWRaK5Z7Ji9zPxu7i1wL8cb7EpS6dFe0slEbQvrH Bz/gvZ/lg/AMQrPR3j+t5L+XcpA97irxUu/DFRoyo0KiHUCLF3FDxTmWectYTkHCPQ 3qKec4q2k5t/05f0CYTsV1ID8n8ddc/nIL+GFZAVp07g2xOh141lErxHY2XB4ubY48 2MCI24GQp2CJl1RRIdBRY4GT96Sndc+s952hZ8zYN+Ohz5CihUC5iakxPNdvXmSha9 gGCrMFVGfqlEzAx91VFW7x3IanxAag2sq7SEOT3J5DmZLmC9d1bMG+7lIOzWauutrz nuSMDIz4ubXIA== X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-12-25_16:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1612250366 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: Re: newbie rm --^file question From: Akihiko Hohji In-reply-to: <161225131004.ZM26673@torch.brasslantern.com> Date: Sun, 25 Dec 2016 16:49:44 -0500 Cc: "zsh-users@zsh.org" Content-transfer-encoding: quoted-printable Message-id: <8789C49A-57C0-49FA-BC1A-52DCBFBF88FB@me.com> References: <161225131004.ZM26673@torch.brasslantern.com> To: Bart Schaefer , Gabor Maghera X-Mailer: Apple Mail (2.3259) Sorry. Actually extended glob was due to auto-correction by Apple Mail. = I really typed in setopt extendedglob. Either rm -rf with double =E2=80=9C-=E2=80=9C ^file.ext.* or a single = =E2=80=9C-=E2=80=9C does not work. I get the same =E2=80=9Cno matches = found=E2=80=9D message. And there is no space in between =E2=80=9C-=E2=80= =9C. I=E2=80=99ve gotten this approach with the double =E2=80=9C-=E2=80=9C= from a post in Stackoverflow. If I don=E2=80=99t add =E2=80=9C*=E2=80=9D= at the end or begging of file name, it works fine. =20 To just give you more details, the following is the list of files in = /System/Library/Caches; drwxr-xr-x 16 root wheel 544B Dec 16 21:53 . drwxr-xr-x 92 root wheel 3.1K Dec 16 09:31 .. drwxr-xr-x 6 root wheel 204B Dec 15 21:47 com.apple.CVMS -rw-r--r-- 1 root wheel 42K Oct 4 21:52 = com.apple.Components2.SystemCache.Components -rw-r--r-- 1 root wheel 57K Sep 13 20:49 = com.apple.Components2.SystemCache.QuickTimeComponents -rw-r--r-- 1 root wheel 8.6K Dec 16 09:31 = com.apple.IntlDataCache.le -rw-r--r-- 1 root wheel 78K Dec 16 09:31 = com.apple.IntlDataCache.le.kbdx -rw-r--r-- 1 root wheel 21K Dec 16 09:35 = com.apple.app-sandbox-cache.plist -rw-r--r-- 1 root wheel 41B Dec 16 09:32 = com.apple.bootefisignature drwxr-xr-x 3 root wheel 102B Dec 15 21:36 com.apple.bootstamps drwxr-xr-x 2 root wheel 68B Dec 15 21:36 com.apple.corestorage drwx------ 3 root wheel 102B Dec 17 22:30 = com.apple.coresymbolicationd drwxr-xr-x 4 root wheel 136B Dec 15 21:36 com.apple.kext.caches -rw-r--r--@ 1 root wheel 23K Dec 16 21:53 = com.apple.preferencepanes.systemcache -rw-r--r-- 1 root wheel 11K Dec 16 09:35 = com.apple.xpc.extensions.cache -rw-r--r-- 1 root wheel 203K Dec 16 09:35 com.apple.xpchelper.cache I=E2=80=99d like to get rid of directories and files except = com.apple.IntlDataCche.le and com.apple.IntlDataCche.le.kbdx. =20 And I did; setopt extendedglob rm -rf -^com.apple.IntlDataCache.* Then I get zsh: no matches found: -^com.apple.IntlDataCache.le.* Again my system is=20 sw_vers ProductName: Mac OS X ProductVersion: 10.12.2 BuildVersion: 16C67=20 Thanks. =20 AH > On Dec 25, 2016, at 4:10 PM, Bart Schaefer = wrote: >=20 > On Dec 25, 7:22pm, Hoji, Akihiko wrote: > } > } setopt extended glob >=20 > If you literally did that, you should have gotten an error message; = there > is no option named "extended" although there is one named "glob". >=20 > You can use underscores or hyphens between words (actually, between = any > two letters) in option names, but not spaces. >=20 > setopt extendedglob > setopt extended_glob > setopt extended-glob > setopt EX_tend-ed_GLOB >=20 > } rm -rf -^file.ext.* >=20 > Is there a space missing there between the second "-" and the "^" ? = Or > do the files you want to remove really have names beginning with "-" ? >=20 > } I would appreciate a poster as to what I am doing wrong.=20 >=20 > Other than misplaced spacing, you seem to have it; see Gabor's = example.