lsfiles.sh
10 linesbash
DOWNLOAD
1#!/bin/bash
2# Aim: Program to perform file listing (File Listing).
3count=1
4for file in *; do
5    if [ -f $file ]; then
6        created=$(date -r "$file" +%Y-%m-%d)
7        printf "%d\t%s\t%s\n" "$count" "$created" "$file"
8        count=$((count+1))
9    fi
10done