AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1304123
Accepted
nobody
nobody
Asked: 2021-01-01 07:35:04 +0800 CST2021-01-01 07:35:04 +0800 CST 2021-01-01 07:35:04 +0800 CST

为什么我的绑定挂载上的 find 不起作用

  • 772

我正在运行 lubuntu 20.04。

在 /etc/fstab 中,我挂载了我的 Debian-home 文件系统,并从该文件系统中绑定了一个文件夹。

cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=a19641aa-75ea-4815-b7c3-ce4c0a3cd0c9 /              ext4    defaults,discard 0 1
UUID=3bbf1ad8-b0d0-464e-a73b-9337e16d95d0 /home          ext4    defaults   0 2
UUID=927f38a0-c962-47de-9361-f1730032704e swap           swap    defaults   0 2
# Debian-home einbinden  # my debian $HOME filesystem
UUID=1ebf0f02-cdd8-44d9-80f9-7078de79e191  /media/debian-home-partition  ext4 user,auto    0       2
# einzelne Ordner einbinden von debian-home # folder with Videos
/media/debian-home-partition/alex/jd2  /home/alex/jd2   none  bind,defaults                 0       0

tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

debian 和 ubuntu 中的用户名和 (id/gid) 相同。我可以将 ubuntu $HOME 中的 mv 或 cp 文件绑定到文件夹。

但不知何故 find 不起作用。

find jd2/downloads/ -name Xemnas

没有什么。

但

ls -al jd2/downloads/ | grep -i xemnas
-rw-rw-r--   1 alex alex 305670178 Dez 31 16:18 Kingdom Hearts 3 ReMind - Roxas, Axel, Xion vs Xemnas Boss Fight (PS4 Pro) (4K) (60FPS)-AQofRl7z2u8.mp4

尝试一点调试

LANG=C
alex@Guilmon:~$ find -D tree jd2/downloads/ -name xemnas
Predicate List:
[(] [-name] [)] [-a] [-print] 
Eval Tree:
pred=[-a] type=bi_op prec=and cost=Unknown est_success_rate=0,1000 no side effects 
left:
    pred=[-name xemnas] type=primary prec=no cost=Unknown est_success_rate=0,1000 no side effects 
    no children.
right:
    pred=[-print] type=primary prec=no cost=Unknown est_success_rate=1,000 side effects 
    no children.
Normalized Eval Tree:
pred=[-a] type=bi_op prec=and cost=Nothing est_success_rate=0,1000 no side effects 
left:
    pred=[-a] type=bi_op prec=and cost=Nothing est_success_rate=0,1000 no side effects 
    no left.
    right:
        pred=[-name xemnas] type=primary prec=no cost=Nothing est_success_rate=0,1000 no side effects 
        no children.
right:
    pred=[-print] type=primary prec=no cost=Nothing est_success_rate=1,000 side effects 
    no children.
Optimized Eval Tree:
pred=[-a] type=bi_op prec=and cost=Nothing est_success_rate=0,1000 no side effects 
left:
    pred=[-a] type=bi_op prec=and cost=Nothing est_success_rate=0,1000 no side effects 
    no left.
    right:
        pred=[-name xemnas] type=primary prec=no cost=Nothing est_success_rate=0,1000 no side effects 
        no children.
right:
    pred=[-print] type=primary prec=no cost=Nothing est_success_rate=1,000 side effects 
    no children.
Optimized command line:
-name xemnas [est success rate 0,1] -a [est success rate 0,1] -print [est success rate 1] 

我的绑定安装不正确吗?还是我通过 find 命令监督了某些事情?

lubuntu
  • 1 1 个回答
  • 66 Views

1 个回答

  • Voted
  1. Best Answer
    steeldriver
    2021-01-01T08:27:32+08:002021-01-01T08:27:32+08:00

    命令

    find <path> -name xemnas 
    

    只会匹配名称完全正确的文件xemnas- 等同于您ls ... | grep -i xemnas需要的命令

    find <path> -iname '*xemnas*'
    

    其中*s 是匹配零个或多个前导/尾随字符的全局通配符,-iname并使匹配不区分大小写。对于您的特定情况,您还可以使用使最初的 X 不区分大小写-name '*[Xx]emnas*'

    • 2

相关问题

  • 我无法在 Hotot 中打开 URL

  • 如何使用 .html 文件作为桌面背景/壁纸?

  • 有没有办法强制 Ubuntu 对我的适配器使用 WPA?

  • 安装在 Live USB 驱动器上的顶级软件,用于 Windows 恢复

  • 替换 /home 后丢失 LXDE 菜单

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve