Which of the following is/are external commands? A. Edit B. Label C. Sys D. All of above

Edit
Label
Sys
All of above

The correct answer is: D. All of above

An external command is a command that is not built into the shell. It is a program that is stored on the file system and is executed by the shell.

The commands edit, label, and sys are all external commands.

  • edit is a command-line text editor. It can be used to create, edit, and save text files.
  • label is a command that can be used to create labels on files. Labels can be used to organize files and to make them easier to find.
  • sys is a command that can be used to manage the system. It can be used to start and stop services, to view system information, and to change system settings.

External commands are typically stored in the /bin directory. To execute an external command, you can type the command name at the prompt or you can use the which command to find the location of the command.

For example, to edit a file called myfile.txt, you would type the following command:

edit myfile.txt

To create a label for a file called myfile.txt, you would type the following command:

label myfile.txt

To view the system information, you would type the following command:

sys

External commands can also be used in shell scripts. A shell script is a file that contains a series of commands that are executed by the shell. To run a shell script, you can type the name of the script at the prompt or you can use the bash command to run the script.

For example, the following shell script prints the current date and time:

“`

!/bin/bash

echo “The current date and time is: $(date)”
“`

To run this script, you would type the following command:

bash myscript.sh

External commands are a powerful tool that can be used to manage your system and to automate tasks.

Exit mobile version