Is it possible in Linux command line to have a command repeat every n seconds?
Say, I have an import running, and I am doing
ls -l
to check if the file size is increasing. I would like to have a command to have this repeat automatically.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Watch every 5 seconds …
watch -n 5 ls -lIf you wish to have visual confirmation of changes, append
--differencesprior to thelscommand.According to the OSX man page, there’s also
Linux/Unix man page can be found here