All for Joomla All for Webmasters

Is my file updated or not | Check with linux script


Need script to to check the my file is getting updated or not.

So if you want a script which check that your file is updated or not below is a simple script.

#! /bin/bash
ls -ltr /home/net/file21.txt | awk ‘{print $6,$7}’ | while read i
do
Current_Date=$(date ‘+%b %d’)
echo $Current_Date
if [[ “$Current_Date” == “$i” ]] ; then
echo “Files Updated ”
exit 0
else
echo “Log files are not updated please check”
exit 0
fi
done


Like it? Share with your friends!

0
, 0 points

Is my file updated or not | Check with linux script

log in

Become a part of our community!

reset password

Back to
log in
Choose A Format
Personality quiz
Trivia quiz
Poll
Story
List
Meme
Video
Audio
Image