Linux Oneword
Linux Oneword
```sh
case expression in
pattern1)
statements;;
pattern2)
statements;;
*)
default statements;;
esac
```
The nice value of a process determines its priority for CPU scheduling. A
lower nice value means higher priority, while a higher nice value means
lower priority.
The `uniq` command in Linux is used to filter out or report repeated lines
in a file. It only works on consecutive duplicate lines, so it is often used in
conjunction with the `sort` command.
24. **What is meant by background processing in Linux?**
Background processing allows a command or script to run in the
background, freeing up the terminal for other tasks. This is achieved by
appending an ampersand (`&`) to the command.
25. **Which command is used to count the total number of words, lines
and characters in a file?**
The `wc` command is used to count the total number of words, lines,
and characters in a file. For example, `wc filename`.
The `head` command displays the first part of a file, typically the first 10
lines by default. The `tail` command displays the last part of a file, also
typically the last 10 lines by default.
The i-node table is a data structure used by the Linux file system to store
information about files and directories. Each i-node contains metadata
about a file, including its size, owner, permissions, and pointers to the data
blocks on the disk.
33. **Which are the commands used to create files in Linux?**
Commands like `touch`, `echo`, and `cat` are used to create files in
Linux. For example, `touch filename` creates an empty file, `echo "text" >
filename` creates a file with text, and `cat > filename` allows for file
creation with manual input.
Pipes are a feature in Unix and Linux that allow the output of one
command to be used as the input for another command, enabling powerful
command chaining.
The shell environment refers to the set of variables and settings that
define the behavior of the shell and how it interacts with the system. This
includes environment variables, aliases, and functions.
50. **Explain features of BASH shell.**
BASH (Bourne Again SHell) features include command-line editing,
unlimited command history, job control, shell scripting capabilities, and
support for various programming constructs.
Major types of shells include the Bourne Shell (sh), C Shell (csh), Korn Shell
(ksh), and Bourne Again Shell (bash), each offering different features and
scripting capabilities.
60. **How can you find the product of two numbers using expr command
in Linux?**
To find the product of two numbers using the `expr` command, use:
`expr num1 \* num2`. For example, `expr 5 \* 3` will return 15.
The boot block is a reserved block on a storage device that contains the
bootstrap code used to start the operating system. It is executed during the
boot process.
68. **How Linux differs from other operating system like MS Windows?**
Linux is open-source, allowing users to modify and distribute the code,
whereas MS Windows is a proprietary operating system. Linux is also
known for its stability, security, and flexibility, making it popular for servers
and development environments.