Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bash-标识其他文件未引用的文件_Bash_Sed_Awk_Grep - Fatal编程技术网

Bash-标识其他文件未引用的文件

Bash-标识其他文件未引用的文件,bash,sed,awk,grep,Bash,Sed,Awk,Grep,我有一个使用OpenWRT路由器的网站。我想通过删除未使用的文件来优化站点。这是我的目录结构 /www/images /www/js /www/styles /www/otherSubDirectories <--- not really named that 这将告诉我所有引用图像的文件。也许有一些变化 任何帮助都将不胜感激 EV考虑使用交叉参考程序(例如)解决此问题。(我还没有验证lxr是否可以完成这项工作,但我相信它可以。)如果一个现成的交叉引用程序不起作用,那就用你知道

我有一个使用OpenWRT路由器的网站。我想通过删除未使用的文件来优化站点。这是我的目录结构

 /www/images
 /www/js
 /www/styles
 /www/otherSubDirectories  <--- not really named that
这将告诉我所有引用图像的文件。也许有一些变化

任何帮助都将不胜感激


EV

考虑使用交叉参考程序(例如)解决此问题。(我还没有验证lxr是否可以完成这项工作,但我相信它可以。)如果一个现成的交叉引用程序不起作用,那就用你知道的语言寻找一个开源交叉引用程序,并对其进行调整。

是一个非常好的工具


通过模糊内容分析找出哪些文件被其他文件使用(引用)

这看起来确实是一个有趣的工具。我将对此进行探索,看看我能想出什么。
 find . | xargs grep -Hn 'myImage.jpg'