Interviewddd
Interviewddd
su (switch user):
1. Usage:
Allows a user to switch to another user account, typically the
superuser.
2. Permission System:
Requires the user to know the password of the target user
account. This means that if you want to switch to the
superuser account, you need to know the superuser password.
$@ and $*
3
Boot lock
Inode Block
Data Block
Super Block
17) In shell scripting, where you will find the login names of all the users on a
system and how they can be printed at the same time?
There is a file “etc/shadow file which contains all the information related to the users and the
same can be printed or displayed anytime when the need of same is felt. You have no reasons
to worry about this and the command awk-F can let you print them all in one go.
5
Grcefull kill
2. kill -15
Sends the SIGTERM signal.
SIGTERM (signal number 15) is a polite way to ask a process to
terminate. It allows the process to perform cleanup (such as closing
files and freeing resources) before it exits.
Most applications respond to SIGTERM by shutting down gracefully, but
the process can ignore this signal if it is programmed to do so.
Copy code
sudo df -h