I use find to find the directory, but I don't know how to print it first and then output it.

write a shell script that looks at the contents of the current directory and prints out the word "Directory" for all directories, followed by a comma-separated list of directory names and contents sorted by modification time, and all files print the words "file" and file name
clipboard.png

.
Nov.11,2021

looks like an assignment.

anyway

there are many kinds of shell scripts, such as a version of bash for reference

-sharp!/bin/bash
walk() {
        local indent="${2:-0}"
        for entry in "$1"/*; do
                [[ -f "$entry" ]] && printf ": %*s%s\n" $indent '' "$entry"
                [[ -d "$entry" ]] && printf "Direcotry: %*s $entry \n" $indent &&   walk "$entry" $((indent+4))
        done
}
walk "$1"

give another idea

-sharp!/bin/sh

for filename in ./*
do
if [ -d "$filename" ]; then

  echo "Directory: $filename /n `ls -l -t` $filename /n"

else [ -f "$filename" ]; 

  echo "file:$filename"

fi
done
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4f49f-5a06c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4f49f-5a06c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?