LSA1

 Practical 1: Graphical user Interface and Command Line Interface process

a) The Command Line Interface:

1. man : It is used to display the user manual of any command that we can run on the terminal.

man -l

cd

man -k time | grep 8

date 05061256

date

mkdir -create directory

mkdir /tempdir

b) cp : This command is used to copying files from one location to another location.

cp /etc/[abc]* /tempdir

c) ls : It is used to list files or directories in Linux.

ls /

d) man ls : It is used to display the user manual of any command that we can run on the terminal.

man ls

e) ls –t : It is used show the sorted filed modification by time.

ls -t

f) ls –t etc :

ls -t /etc

g) find : It is used to find files and directories.

find / -size +100M

1). Manage processes: A process in Linux is nothing but a program in execution. It’s a

running instance of a program. Any command that you execute starts a process.

i) Manage jobs :

system-config-users

bg: This command in Linux is used to place foreground jobs in background.

bg

jobs

fg: This command in Linux used to put a background job in foreground.

fg

jobs

ii. Parent & Child process:

bash: The Linux Bash is also known as 'Bourne-again Shell.'

ssh: ssh stands for “Secure Shell”. It is a protocol used to securely connect to a remote

server/system.

bash

ssh -X localhost

ps: It is used to list the currently running processes and their PIDs along with some other

information depends on different options.

ps afx

kill: This command is used to terminate the processes manually.

kill 2758

dd if=/dev/zero of=/dev/null & : To create duplicate data(dd) input files(if) of /dev/zero into

output files(of) of /dev/null to run in background(&)

dd if=/dev/zero of=/dev/null & [3] 2295

dd if=/dev/zero of=/dev/null & [4] 2297

dd if=/dev/zero of=/dev/null & [5] 2298

dd if=/dev/zero of=/dev/null & [6] 2299 

Top: This command shows a real-time view of running processes in Linux and displays kernel-managed tasks.

top

Press k to kill the process which we have created using dd command.

PID to kill: 2294

Kill PID 2294 witj signal [15]:

As you can see now the process with PID: 2294 has been terminated.

So we will terminate all the processes which we have created above using command dd.

iv. Mail:

su: Switch user(su) lets you switch the current user to any other user.

su - : It lets you to switch the current user into any other user with that user environment.

su - rjcit

crontab -e: To schedule a process and installing a new crontab.

crontab -e

mail: This command is used to show the Cron Daemon.

mail


Comments

Popular posts from this blog

python(BI)

(PP-7)Create a class called Numbers, which has a single class attribute called MULTIPLIER, and a constructor which takes the parameters x and y (these should all be numbers). i. Write a method called add which returns the sum of the attributes x and y. ii. Write a class method called multiply, which takes a single number parameter a and returns the product of a and MULTIPLIER. iii. Write a static method called subtract, which takes two number parameters, b and c, and returns b - c. iv. Write a method called value which returns a tuple containing the values of x and y. Make this method into a property, and write a setter and a deleter for manipulating the values of x and y.