How to batch delete junk files

How to delete junk files in GNU/Linux(R) OS

Delete junk macOS(R) files.

All commands below relate to the current working directory and everything inside it.

Display ".DS_Store" files:

find . -name '.DS_Store' -type f -print

Delete ".DS_Store" files:

find . -name '.DS_Store' -type f -delete

Display ".localized" files:

find . -name '.localized' -type f -size 0c -print

Delete ".localized" files:

find . -name '.localized' -type f -size 0c -delete

Display "._*" files:

find . -name '._*' -type f -print

Delete "._*" files:

find . -name '._*' -type f -delete

How to delete junk files in Microsoft Windows OS

Delete junk Windows and macOS(R) files.

Open the command line window.

Delete all "desktop.ini" files from the current directory by the command:

del /s /q /f /a desktop.ini

Delete all "Thumbs.db" files from the current directory by the command:

del /s /q /f /a Thumbs.db

Delete all ".DS_STORE" files without prompts by the following command:

del /s /q /f /a .DS_STORE

In addition to ".DS_STORE", macOS will also put files starting with "._". Use the following command to remove them:

del /s /q /f /a ._.*
and maybe also ._* files are present, then use:
del /s /q /f /a ._*

Trademark notices

Apple(R), MacBook(R), MacBook Air(R), MacBook Pro(R), iTunes(R), iBooks(R), App Store(R), iCloud(R), iMessage(R), FaceTime(R), Safari(R), FileVault(R), MagSafe(R), Touch Bar(TM), and macOS(R) are registered trademarks of Apple Inc. in the United States and other countries.
Linux(R) is registered trademark of Linus Torvalds in the United States and other countries.


Copyright (c) 2022 Leonid Dorogin