This shell program will lists files by modification and access time, by default the script should show the listing of all files in the current directory
echo "*****************************" if [ "$1" == "la" ];then echo "Access time" ls -ul | tr -s " " | cut -d " " -f 6,7,8,9 elif [ "$1" == "lm" ];then echo "Modification time" ls -ml | tr -s " " | cut -d " " -f 6,7,8,9 else echo "***list of all files in current directory***" ls -l | tr -s " " | cut -d " " -f 9 fi
No comments:
Write comments