需要查找大小超过 1GB 且文件类型扩展名为
Need to find a file with size more than 1GB with extension of file type
我需要找到一个大小超过 1GB 的文件,文件扩展名应该是 tar 或 gzip 或 zip
我用下面的命令找到了
find /home/test -type f -size +1G -and -regex '\(.*tar\|.*gzip\|.*zip\|.*tgz\)'
但是当我将文件大小与文件扩展名组合在一起时,上面的命令不起作用。
请告诉我如何找到大小超过 1 GB 的文件,文件的扩展名应为 tar 或 gzip 或 zip
您似乎正在搜索大小超过 1GB 的文件,这将排除任何大小等于 1GB 的文件
find /home/test -type f -size +1G -and -regex '\(.*tar\|.*gzip\|.*zip\|.*tgz\)'
要获得等于或大于 1GB 的文件,请使用类似:
find /home/test -type f -size +999M -and -regex '\(.*tar\|.*gzip\|.*zip\|.*tgz\)'
如果您需要更高的准确性,请在指定大小时使用 c 表示字节或 k 表示千字节。
我需要找到一个大小超过 1GB 的文件,文件扩展名应该是 tar 或 gzip 或 zip
我用下面的命令找到了
find /home/test -type f -size +1G -and -regex '\(.*tar\|.*gzip\|.*zip\|.*tgz\)'
但是当我将文件大小与文件扩展名组合在一起时,上面的命令不起作用。
请告诉我如何找到大小超过 1 GB 的文件,文件的扩展名应为 tar 或 gzip 或 zip
您似乎正在搜索大小超过 1GB 的文件,这将排除任何大小等于 1GB 的文件
find /home/test -type f -size +1G -and -regex '\(.*tar\|.*gzip\|.*zip\|.*tgz\)'
要获得等于或大于 1GB 的文件,请使用类似:
find /home/test -type f -size +999M -and -regex '\(.*tar\|.*gzip\|.*zip\|.*tgz\)'
如果您需要更高的准确性,请在指定大小时使用 c 表示字节或 k 表示千字节。