首页 > 系统相关 >linux8-which&find

linux8-which&find

时间:2024-04-30 11:45:46浏览次数:16  
标签:文件夹 文件 name linux8 查找 test find

linux8-which&find


which

查看linux命令的程序文件存放位置

# 查看cd命令的程序文件位置
which cd


find

文件/文件夹查找

选项: -name 以文件名形式去查找

文件名需要用双引号包裹

# 从根目录开始搜索test文件/文件夹
find / -name "test"
# 从HOME目录开始搜索test文件/文件夹
find ~ - name "test"

通过通配符查找

# 从根目录开始搜索test开头的文件/文件夹
find / -name "test*"
# 从根目录开始搜索test结尾的文件/文件夹
find / -name "*test"
# 从根目录开始搜索包含test的文件/文件夹
find / -name "*test*"

选项: -size 按照文件大小查找

# 查找小于10kb的文件
find / -size -10k
# 查找大于100MB的文件
find / -size +100M
# 查找大于1GB的文件
find / -size +1G

(可以用ctrl+c强制终止查询)

标签:文件夹,文件,name,linux8,查找,test,find
From: https://www.cnblogs.com/HIK4RU44/p/18167716

相关文章

  • Could not find module '.../libtorchaudio_ffmpeg.pyd' | RuntimeError: StreamRea
    Windows中使用torchaudio.io.StreamReader时报错:FileNotFoundError:Couldnotfindmodule'D:\software\miniconda3\envs\pytorch\Lib\site-packages\torchaudio\lib\libtorchaudio_ffmpeg.pyd'(oroneofitsdependencies).Tryusingthefullpathwith......
  • R语言中取色器 colorfindr测试
      需求:一张图片,想知道到底是什么颜色,在R语言中的颜色系统中。测试图片如下: 001、install.packages("colorfindr")##安装包library("colorfindr")##加载包get_colors(img="aa.png",min_share=......
  • 软件开发与创新-ColorFinder风险分析和典型用户
    典型用户:风险分析......
  • MBIST和BISR+循环移位和强制转换+verdi操作+vip需要disable auto recording+vim设置某
    MBIST和BISRhttps://blog.csdn.net/liubin1222/article/details/103995449https://zhuanlan.zhihu.com/p/161185302进行内存修复需要两步:首先在可修复内存测试期间,由MBIST控制器诊断出的故障。第二步是修复内存,确认修复签名。可修复的存储器都有带修复签名的寄存器。MBIST(Me......
  • find的 -L 参数
    `find-L`命令在Linux中用于**跟随符号链接,以查找链接指向的文件或目录**。具体来说,`-L`选项告诉`find`命令,当遇到符号链接时,**应该进入链接指向的文件或目录进行查找**,而不是停留在链接本身。这个选项特别有用,当你需要搜索一个包含大量符号链接的文件系统时,因为默认情况下,`find`......
  • find grep
      find.-nametest.cgrep-rlinuxize.com/etc$grep-EA.+aexample.txtAlbaniaAlgeriaYoucanusesquarebracketstoprovidealistofletters:$grep-E[AC].+aexample.txtAlbaniaAlgeriaCanadaThisworksfornumbers,too.Theresultsmaysurpri......
  • Vetur can't find `tsconfig.json` or `jsconfig.json` in *****报错
    解决Vscode报错[Veturcan‘tfind‘tsconfig.json‘or‘jsconfig.json‘] 报错原因翻译一下报错信息,"Vetur找不到tsconfig.json文件或者jsconfig.json文件".首先Vetur只会扫描项目的根目录下的jsconfig或者tsconfig,如果没有这两个文件之一,就会报错.如果你是通过vue-c......
  • Electron打包的时候路径出现问题!include: could not find: "C:\Users\xxxx\AppDat
    !include:couldnotopenfile:"C:\ztg\projects\electron-vite-vue-ts\node_modules\.pnpm\[email protected][email protected][email protected]_dmg-bui_lrspnoputfiosacwyigcypdbdi\node_modules\app-builder-lib\t......
  • 在Linux中,find命令和locate命令有什么区别?
    在Linux中,find和locate都是用于查找文件的命令,但它们的工作方式和效率有着显著的不同:1.find命令工作原理:find命令直接在文件系统中遍历目录结构,实时查找符合特定条件的文件或目录。这意味着它会逐个检查文件系统的实际内容,因此查找过程可能会比较慢,尤其是当搜索大型文件系统......
  • cmake报错CMake Error: Could not find CMAKE_ROOT
    从cmake的地址下载源码https://cmake.org/files/比如cmake-3.14.0-rc3.tar.gz tarxvfcmake-3.14.0-rc3.tar.gz cd  cmake-3.14.0-rc3../configuremake-j32sudomakeinstall 然后执行cmake发现报了CMakeError:CouldnotfindCMAKE_ROOT的错误。这个错误的原......