Linux shellscript(目录和文件) [英] Linux shellscript(directory and file)

查看:119
本文介绍了Linux shellscript(目录和文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一些帮助,请问?
创建一个shell脚本,该脚本将接收一个目录名和一个文件名作为参数,该shell将递归地在目录中查找该文件,并将确定是否在目录中找到了作为参数给出的文件(即使该文件存在)是否在子目录中,如果找到文件,shell会说出文件的尺寸. :sigh:

Some help,pls?
Create a shellscript which will receive as parameters a dir name and a file name.The shell will recursively look for the file in the dir and it will determine if the file given as a parameter is found in the dir.(even if the file exists in a subdir)or not,and if it finds the file the shell will say the dimension of the file. :sigh:

推荐答案

将shell脚本中的参数作为
Take argument in the shell script as


1
使用find -r命令.

这可能会对您有所帮助.
1
use find -r command.

This might help you.


这篇关于Linux shellscript(目录和文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆