find / -type f -user starky 检索根目录下所有属主为 starky 的文件 类似于 -user选项,-group 选项则可以根据文件或目录的属组进行检索。 6. 根据时间日期进行检索 有些时候,需要根据文件创建或修改的时间进行检索。 Linux 系统中,与文件相关联的时间参数有以下三种: 修改时间(Modification time):最后一次文件...
find /home -user cnscn 列出/home目录内属于用户cnscn的文件或目录 find /home -uid +501 列出/home目录内用户的识别码大于501的文件或目录 find /home -group cnscn 列出/home内组为cnscn的文件或目录 find /home -gid 501 列出/home内组id为501的文件或目录 find /home -nouser 列出/home内不属于本...
$ find $HOME -name "*.sh" -o -name "jumpscripts" /home/linuxtechi/automation/cleanup.sh /...
下面的命令会在/目录及其子目录下搜索当前文件系统(也就是/挂载的文件系统)中所有以.log结尾的文件,也就是说如果你有多个分区挂载在/下面,下面的搜索不会去搜索其他的分区的(比如/home/) # find / -xdev -name "*.log" 1. 26.在同一个命令中使用多个{} linux手册说命令中只能使用一个{},不过你可以像...
To locate all the file that are owned by a particular user in /home directory, run following command, 要找到 /home 目录中属于特定用户的所有文件,请运行以下命令 $ sudo find $HOME -user linuxtechi (16) 找到一个组拥有的所有文件 下面的命令将搜索 apache 组拥有的所有文件。 $ sudo find / -...
Linux 上的find命令是findutil软件包的一部分,一般已经默认集成在了几乎所有的发行版中。 find 命令有非常大的灵活性,可以向其指定丰富的搜索条件(如文件权限、属主、属组、文件类型、日期和大小等)来定位系统中的文件和目录。 此外,find 还支持对搜索到的结果进行多种类型的命令操作。
-user 按照文件属主来查找文件。 find ~ -user sam –print 在$HOME目录中查找文件属主为sam的文件 -group 按照文件所属的组来查找文件。 find /apps -group gem –print 在/apps目录下查找属于gem用户组的文件 -mtime -n +n 按照文件的更改时间来查找文件, - n表示文件更改时间距现在n天以内,+ n表示文...
[ Keep your most commonly used commands handy with theLinux commands cheat sheet. ] 1. Find a single file by name When you know the name of a file but can't remember where you saved it, usefindto search your home directory. Use2>/dev/nullto silence permission errors (or usesudoto ...
How do I find all files containing a specific string of text within their file contents? The following doesn't work. It seems to display every single file in the system. find / -type f -exec grep -H 'text-to-find-here' {} \; linux text grep directory find Share Improve this qu...
Create a case-insensitive searchable multi-select list ofPDFfiles under your$HOMEdirectory and open the selection with your configured PDF viewer. To list all file types, drop the-e pdfargument. fd --typef -e pdf .$HOME| rofi -keep-right -dmenu -i -p FILES -multi-select | xargs -I...