Guest_imported
New member
- Jan 1, 1970
- 0
Write a bash script named oldest that accepts a directory name as a command line argument and then looks at all of teh files in that directory to find the oldest file. Print out the name fo teh file adn teh age of that file in days. If no directory name is listed on the command line, perform the check on the current directory. This is what i have. Can you please help me.
while (*)
$age = -M
fi [ oldest_age -lt $age && $oldest_name -eq $_ && oldest_age -eq $age ]; then
echo "The oldest file is $oldest_name and is $oldest_age days old. "
while (*)
$age = -M
fi [ oldest_age -lt $age && $oldest_name -eq $_ && oldest_age -eq $age ]; then
echo "The oldest file is $oldest_name and is $oldest_age days old. "