Professional Documents
Culture Documents
CLASS : CBA
ENROLMENT NO : 16012101007
BATCH : CSE - 21
PRACTICAL 3:
PROCESS RELATED LINUX COMMANDS
and init.
Syntax:
ps [options]
Syntax:
kill [options] <pid> [...]
-L, --table
The optional SKIP1 and SKIP2 specify the number of bytes to skip at the
Syntax:
cmp [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]
-b, --print-bytes
-i, --ignore-initial=SKIP
This manual page documents the GNU version of rm. rm removes each
than three files or the -r, -R, or --recursive are given, then rm
prompts the user for whether to proceed with the entire operation. If
the response is not affirmative, the entire command is aborted.
Syntax:
rm [OPTION]... FILE...
-f, --force
Syntax:
uname [OPTION]...
-a, --all
and -i if unknown:
-s, --kernel-name
may only change the password for his/her own account, while the
superuser may change the password for any account. passwd also changes
Syntax:
passwd [options] [LOGIN]
When invoked without the -D option, the useradd command creates a new
user account using the values specified on the command line plus the
default values from the system. Depending on command line options, the
useradd command will update system files and may also create the new
Syntax:
useradd [options] LOGIN
useradd -D
useradd -D [options]
specified on the command line plus the default values from the system.
The new group will be entered into the system files as needed.
Syntax:
-h, --help
The groupdel command modifies the system account files, deleting all
Syntax:
groupdel [options] GROUP
-h, --help
what the user would expect had the user logged in directly.
Syntax:
su [options] [username]
Specify a command that will be invoked by the shell using its -c.
controlling TTY.
-, -l, --login
Syntax:
sudo -h | -K | -k | -V
sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command]
sudo [-AbEHnPS] [-C num] [-g group] [-h host] [-p prompt] [-r role]
sudoedit [-AknS] [-C num] [-g group] [-h host] [-p prompt] [-u user] file
-h, --help Display a short help message to the standard output and exit.
-b, --background
Syntax:
who [OPTION]... [ FILE | ARG1 ARG2 ]
-a, --all
same as -b -d --login -p -r -t -T -u
-b, --boot
Print the user name associated with the current effective user ID.
Same as id -un.
Syntax:
whoami [OPTION]...
The utmp file records who is currently using the system. The wtmp file
The function login() takes the supplied struct utmp, ut, and writes it
The function logout() clears the entry in the utmp file again.
Syntax:
#include <utmp.h>
The exit() function causes normal process termination and the value of
Syntax:
#include <stdlib.h>
void exit(int status);
This manual page documents the GNU version of find. GNU find searches
the directory tree rooted at each given file name by evaluating the
hand side is false for and operations, true for or), at which point
Syntax:
find [-H] [-L] [-P] [-D debugopts] [-Olevel] [path...] [expression]
All files accessible in a Unix system are arranged in one big tree, the
file hierarchy, rooted at /. These files can be spread out over sev
eral devices. The mount command serves to attach the filesystem found
on some device to the big file tree. Conversely, the umount(8) command
Syntax:
mount [-lhV]
mount -h
mount -V
prints a version string
This manual page documents the GNU version of df. df displays the
amount of disk space available on the file system containing each file
Syntax:
df [OPTION]... [FILE]...
-a, --all
-B, --block-size=SIZE
fdisk does not understand GUID partition tables (GPTs) and it is not
designed for large partitions. In these cases, use the more advanced
GNU parted(8).
fdisk does not use DOS-compatible mode and cylinders as display units
by default. The old deprecated DOS behavior can be enabled with the
Syntax:
fdisk [-uc] [-b sectorsize] [-C cyls] [-H heads] [-S sects] device
fdisk -s partition...
fdisk -v
fdisk -h
free displays the total amount of free and used physical and swap mem
ory in the system, as well as the buffers used by the kernel. The
shared memory column represents either the MemShared value (2.4 series
kernels) or the Shmem value (2.6 series kernels and later) taken from
Syntax:
free [options]
-b, --bytes
-k, --kilo
Syntax:
top -hv|-bcHiOSs -d secs -n max -u|U user -p pid -o fld -w [cols]
OTHER COMMANDS
Syntax:
echo [SHORT-OPTION]... [STRING]...
echo LONG-OPTION
The cal utility displays a simple calendar in traditional format and ncal
offers an alternative layout, more options and the date of Easter. The
new format is a little cramped but it makes a year fit on a 25x80 termi
Syntax:
cal [-3hjy] [-A number] [-B number] [[month] year]
year]
--version
Syntax:
expr EXPRESSION
expr OPTION