Crontab.guru - The cron schedule expression editor
In this lab, you will:
In this exercise, you will create a log file from the ps command. This log file should be added to the SharedFolders section:
Create a log file named processes.csv from ps -aux and omit any processes that contain root user or contain "["or"]" in the COMMAND section.
Note: There is a space following the command followed by a period to represent the current location.
To validate that you are in the /home/ec2-user/companyA
folder, enter pwd
and press Enter.
If you are not in this folder, enter cd companyA
and press Enter.
View all processes running on the machine and filter out the word root by typing sudo ps -aux | grep -v root | sudo tee SharedFolders/processes.csv
and pressing ENTER.
Este comando es similar al anterior, pero en lugar de mostrar la salida en la pantalla, la redirige a un archivo llamado "processes.csv" que se encuentra en la carpeta "SharedFolders".
La explicación detallada del comando es la siguiente: