bash
The `netstat --listening` command lists all the listening ports on the system, which is useful for network troubleshooting and monitoring active connections. This demonstrates how to identify open ports and services.
netstat
bash
The `netstat --listening` command lists all the listening ports on the system, which is useful for network troubleshooting and monitoring active connections. This demonstrates how to identify open ports and services.
netstat
bash
Display network interface statistics using the `netstat` command. This is useful for troubleshooting network issues by showing detailed information about network interfaces.
netstat
bash
Display the current routing table using the `ip route show` command. This is useful for network troubleshooting to view the routes that packets will take based on the destination IP addresses.
ip
bash
Display the IP addresses and network interfaces of the system. This command is useful for network troubleshooting and configuration.
ip
bash
Send 10 ICMP echo requests to `example.com` with a 5-second interval between each request. This command is used for network troubleshooting to check connectivity and response times to a specific host.
ping
bash
Schedule a script to run at a specified time using the `at` command. The script requires a time specification (`TIME_SPEC`) and the path to the script (`SCRIPT_PATH`) as arguments. This demonstrates how to schedule tasks in Bash.
at
bash
Remove a scheduled task with ID `1` using the `at` command. This demonstrates how to delete a previously scheduled task.
at
bash
Display the content of the scheduled task with job ID `1` using the `at` command. This demonstrates how to inspect the details of a specific scheduled task.
at
bash
List all scheduled tasks using the `at` command. This command displays the queue of jobs scheduled to run at a later time.
at
crontab
Schedule the command `foo` to run at midnight on the first day of every month. This demonstrates a cron job setup for periodic task execution.
crontab
This snippet represents a cron job schedule that runs the command `foo` at 4:44 AM every Friday. This demonstrates how to schedule tasks using cron syntax.
bash
This snippet exports the current user's crontab entries to a specified file at `/path/crontab`. This is useful for backing up scheduled tasks.
crontab
bash
This snippet installs a new crontab file located at `/path/crontab` to schedule tasks. It demonstrates how to replace the current user's crontab with a predefined file.
crontab
bash
Edit the current user's crontab file to schedule tasks. This command opens the crontab file in the default editor, allowing the user to add, modify, or remove scheduled tasks. This demonstrates how to manage scheduled tasks using `crontab`.
crontab
bash
List the current user's cron jobs using the `crontab -l` command. This demonstrates how to view scheduled tasks configured for the user.
crontab
bash
Print the current date in ISO 8601 format (YYYY-MM-DD) using the `date` command.
date
bash
Terminate all processes named `foo` using the `killall` command. This demonstrates process termination by name.
killall
bash
Terminate all processes named `foo` forcefully using the `pkill` command with the `-9` signal. This demonstrates how to kill processes by name.
pkill
bash
Kill all processes named `foo` using the `pkill` command. This demonstrates terminating processes by name.
pkill
bash
Display the nice value (priority) of a process by its PID using the `ps` command. This demonstrates how to check the scheduling priority of a process.
ps