web.archive.org/web/20240906023550/https:/apple.stackexchange.com/questions/475141/deleting-all-files-but-some-on-mac-in-terminal

Preview meta tags from the web.archive.org website.

Linked Hostnames

1

Thumbnail

Search Engine Appearance

Google

https://web.archive.org/web/20240906023550/https:/apple.stackexchange.com/questions/475141/deleting-all-files-but-some-on-mac-in-terminal

Deleting all files but some on Mac in Terminal

Is it possible to write a command in Terminal that would delete all files on Mac except for some? Let’s say I have one general folder that consists of N folders with different titles/names. I need to



Bing

Deleting all files but some on Mac in Terminal

https://web.archive.org/web/20240906023550/https:/apple.stackexchange.com/questions/475141/deleting-all-files-but-some-on-mac-in-terminal

Is it possible to write a command in Terminal that would delete all files on Mac except for some? Let’s say I have one general folder that consists of N folders with different titles/names. I need to



DuckDuckGo

https://web.archive.org/web/20240906023550/https:/apple.stackexchange.com/questions/475141/deleting-all-files-but-some-on-mac-in-terminal

Deleting all files but some on Mac in Terminal

Is it possible to write a command in Terminal that would delete all files on Mac except for some? Let’s say I have one general folder that consists of N folders with different titles/names. I need to

  • General Meta Tags

    3
    • title
      macos - Deleting all files but some on Mac in Terminal - Ask Different
    • viewport
      width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0
    • bingbot
      noarchive
  • Open Graph Meta Tags

    6
    • og:type
      website
    • og:url
      https://web.archive.org/web/20240907122415/https://apple.stackexchange.com/questions/475141/deleting-all-files-but-some-on-mac-in-terminal
    • og:site_name
      Ask Different
    • og:image
      https://web.archive.org/web/20240907122415im_/https://cdn.sstatic.net/Sites/apple/Img/[email protected]?v=b514451ec60c
    • twitter:title
      Deleting all files but some on Mac in Terminal
  • Twitter Meta Tags

    2
    • twitter:card
      summary
    • twitter:domain
      apple.stackexchange.com
  • Link Tags

    12
    • alternate
      /web/20240907122415/https://apple.stackexchange.com/feeds/question/475141
    • apple-touch-icon
      https://web.archive.org/web/20240907122415im_/https://cdn.sstatic.net/Sites/apple/Img/apple-touch-icon.png?v=daa7ff1d953e
    • canonical
      https://web.archive.org/web/20240907122415/https://apple.stackexchange.com/questions/475141/deleting-all-files-but-some-on-mac-in-terminal
    • image_src
      https://web.archive.org/web/20240907122415im_/https://cdn.sstatic.net/Sites/apple/Img/apple-touch-icon.png?v=daa7ff1d953e
    • search
      /web/20240907122415/https://apple.stackexchange.com/opensearch.xml

Links

130