Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

LAB 1

1. A batch file deletes everything in “D:\temp\” (for windows)

This batch file will delete everything in D:\temp\

>>> Implement

>>> Execute the batch file below


>>> the file request we hit any key to continue

>>> after the batch file was executed, all files were deleted
I also make it run every 1 minute with the task schedule
2. Script file (for Linux)
>>> Before we delete all directories and files in temp we can see these files and folders are
available.
>>> Write code for delete every thing in “/home/phong/temp”

>>> After the shell script file ran, everything was deleted

>>> Automation deletes all files and directories in /home/phone/temp


With crontab

After 1 every 1 minute it will automatically delete all files in the temp

You might also like