Bash 将提供有关所需目录信息的脚本

Bash script that would give out information about the desired directory

我需要一个类似于 ls 和 dir 命令的脚本。显示有关所需目录的信息。

#!/bin/bash
for entry in *
do
  echo "$entry"
done

但是这个脚本只输出脚本所在目录下的文件。如何在我需要的目录中输出?

你可以接受参数</code>等,稍后再参考</p> <pre><code>for file in ""; do

这个APP提供了更好的学习和理解的方式unix/linux。我想建议你看看。

https://play.google.com/store/apps/details?id=com.kanha.unixlinuxpocketbook

#!/bin/bash
for entry in /dir/I-need/*
do
  echo "$entry"
done

也可能是你想要的

find /dir/I-need