All files in the shell to get the current folder path name

 

method 1:

for dir in $(ls -al ./|awk '/^d/ {print $NF}')
do
echo $dir
done

 

Method 2:

for dir in $(ls ./)
do
[ -d $dir ] && echo $dir
done     

Guess you like

Origin www.cnblogs.com/young233/p/10947354.html