linux - 如何从 Linux 的 shell 中删除所有以 ._ 开头的文件?

标签 linux shell terminal raspberry-pi

果然如题。我已经将一些文件从 Mac 复制到 Raspberry Pi。这导致产生了许多以前缀 ._ 开头的多余文件。我想删除文件夹中以 ._ 开头的所有文件。我该怎么做?

最佳答案

尝试这样的事情:

cd /path/to/directory; \rm -rf ._*

或者如果子文件夹中有递归文件则尝试:

find /path/to/directory -name "._*" -type f -print0| xargs -0 \rm -rf

关于linux - 如何从 Linux 的 shell 中删除所有以 ._ 开头的文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27331548/

相关文章:

linux - 更改 emacs 字体(菜单中没有 "set default font"选项;.emacs 脚本不起作用)

c - Execv Linux printf 不起作用

c++ - 使用 C++ 与 Stockfish shell 交互

android - 运行 adb shell 命令时需要 :android. 权限。WRITE_SECURE_SETTINGS

python - 将多个 csv 文件连接成具有相同标题的单个 csv - Python

Linux 命令 - 根据扩展名和创建日期查找文件

python - 在 linux 的 python 脚本中运行函数运行整个脚本

linux - 中断处理程序中的上下文切换

linux - 将查找命令转换为函数以便在 PDF 文件中搜索

ios - 如何通过命令行在 Xcode 中登录 Apple ID?