How To tell if a script was run in the background ?

The ps utility can get the process state. The process state code will contain the character + when running in foreground. Absence of + means code is running in background. However, it will be hard to tell whether the background script was invoked using nohup. It’s also almost impossible to rely on the presence of … Read more

Linux Operating System 2.

File Permissions The “umask” command can be used to read or set default file permissions for the current user. The umask value is subtracted from the default permissions (666) to give the final permission: 666 : Default permission 022 : – umask value 644 : final permission The “chmod” command is used to alter file … Read more

Linux Operating System 1.

File and Directory The “pwd” command displays the current directory: The “ls” command lists all files and directories in the specified directory. If no location is defined it acts on the current directory. The “-a” flag lists hidden “.” files. The “-l” flag lists file details. ls -al | pg Full directory listing and prompt . ls | wc … Read more