0
0
Linux CLIscripting~20 mins

at command for one-time jobs in Linux CLI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
At Command Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
What is the output of scheduling a job with 'at'?
You run the command echo 'echo Hello' | at now + 1 minute. What output do you expect immediately after running this command?
Linux CLI
echo 'echo Hello' | at now + 1 minute
Ajob 1 at Thu Apr 27 14:05:00 2024
BHello
CSyntax error: invalid time specification
DPermission denied
Attempts:
2 left
💡 Hint
Think about what the 'at' command prints when scheduling a job, not the job's output.
💻 Command Output
intermediate
2:00remaining
What happens if you run 'at' without permissions?
If a user without permission runs echo 'ls' | at now + 5 minutes, what is the expected output?
Linux CLI
echo 'ls' | at now + 5 minutes
Aat: you do not have permission to use at
Bjob 2 at Thu Apr 27 14:10:00 2024
Cls output
DSyntax error: invalid command
Attempts:
2 left
💡 Hint
Consider system restrictions on who can use 'at'.
📝 Syntax
advanced
2:00remaining
Which 'at' command syntax schedules a job for 3:30 PM today?
Choose the correct command to schedule a job to run at 3:30 PM today using 'at'.
Aecho 'backup.sh' | at 15.30
Becho 'backup.sh' | at now + 15:30
Cecho 'backup.sh' | at 3:30pm today
Decho 'backup.sh' | at 15:30
Attempts:
2 left
💡 Hint
The 'at' command accepts 24-hour time format without extra words.
🚀 Application
advanced
2:00remaining
How to list and remove scheduled 'at' jobs?
You have scheduled multiple jobs with 'at'. Which commands correctly list all jobs and remove job number 3?
Aat list to list jobs; at delete 3 to remove job 3
Bat -l to list jobs; at -r 3 to remove job 3
Catq to list jobs; atrm 3 to remove job 3
Dat jobs to list jobs; at cancel 3 to remove job 3
Attempts:
2 left
💡 Hint
The 'atq' and 'atrm' commands are used for managing 'at' jobs.
🧠 Conceptual
expert
3:00remaining
What is the environment context of an 'at' job execution?
When an 'at' job runs, which environment variables and context does it have?
AIt runs with the user's login environment including all shell variables and aliases.
BIt runs with a minimal environment, only standard variables like PATH, without user shell aliases.
CIt runs with root privileges and full system environment.
DIt runs inside a container with isolated environment variables.
Attempts:
2 left
💡 Hint
Think about how 'at' jobs run non-interactively and what environment they inherit.