Sunteți pe pagina 1din 28

1.

Use find to compile a list of all directories in the system, redirecting the output
so that the list of directories ends up in a file called directories.txt and the list of
error messages ends up in a file called errors.txt.

Use below command to listout all the directories in the system:

find /

we can direct the errors to the errors.txt by below command:

find / 2>errors.txt

and we get directories by below command:

find / 2>errors.txt >> directories.txt

2. Try the command sleep 5. What does this command do?

It gives delay for 5 seconds

3. Run the command in the background using &.

It can be done by using below command:

sleep 5 &

by this command we can't see the delay process,but can be seen by using command 'ps'.

4. Run sleep 15 in the foreground, suspend it with Ctrlz and then put it into the
background with bg. Type jobs. Type ps. Bring the job back into the foreground
with fg.

Follow the steps:

1.sleep 15
2.ctrl + z
^Z
[1]+ Stopped

sleep 15

3.bg
[1]+ sleep 15 &
4.jobs
[1]+ Running

sleep 15 &

5.ps
PID TTY

6.fg

TIME CMD

3133 pts/1

00:00:00 bash

3231 pts/1

00:00:00 sleep

3232 pts/1

00:00:00 ps

sleep 15
5. Run sleep 15 in the background using &, and then use kill to terminate the
process by its job number. Repeat, except this time kill the process by specifying
its PID.

For terminate the process by its job no,use below command:

kill %<job no.>

> ex:follow below steps:

1.sleep 15 &
[1] 3454
2.jobs
[1]+ Running

sleep 15 &

3.kill %1
4.jobs
[1]+ Terminated

sleep 15

For terminate the process by its pid no,use below command:

kill <PID no.>

> ex:follow below steps:

1.sleep 15 &
[1] 3289
1.kill 3289
2.jobs
[1]+ Terminated

sleep 15

6. Run sleep 15 in the background using &, and then use kill to suspend the
process. Use bg to continue running the process.

>kill to suspend use command:


kill -STOP <PID no.>

>follow the steps:

1.sleep 15 &
[1] 3514
2.jobs
[1]+ Running

sleep 30 &

3.kill -STOP 3514


[1]+ Stopped
4.bg
[1]+ sleep 30 &

sleep 30

5.jobs
[1]+ Running

sleep 30 &

7. Startup a number of sleep 60 processes in the background, and terminate them


all at the same time using the pkill command.

>pkill -g <pid1>,<pid2>,<pid3>,.......

>follow the steps:

1.create the several processes using command:


sleep 60 &

2.pkill -g 4071,4072,4073,4074,4075

[12] Terminated

sleep 60

[13] Terminated

sleep 60

[14] Terminated

sleep 60

[15]- Terminated

sleep 60

[16]+ Terminated

sleep 60

8. Use ps, w and top to show all processes that are executing.

>ps

PID TTY

TIME CMD

4002 pts/1

00:00:00 bash

4091 pts/1

00:00:01 top

4092 pts/1

00:00:00 top

4094 pts/1

00:00:00 top

4096 pts/1

00:00:00 sleep

4097 pts/1

00:00:00 ps

>w

11:24:07 up 1:39, 3 users, load average: 0.15, 0.14, 0.14


USER

TTY

FROM

LOGIN@ IDLE JCPU PCPU WHAT

kp

tty7

:0

09:44

1:39m 2:57 0.29s gnome-session -

kp

pts/0

:0

09:48 16:00 1.03s 49.23s gnome-terminal

kp

pts/1

:0

11:13

0.00s 1.77s 0.00s w

>top

top - 11:22:27 up 1:38, 3 users, load average: 0.20, 0.15, 0.14


Tasks: 185 total, 1 running, 182 sleeping, 2 stopped, 0 zombie
%Cpu(s): 1.3 us, 0.9 sy, 0.0 ni, 96.9 id, 0.8 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 3885952 total, 3681180 used, 204772 free, 1227008 buffers
KiB Swap: 262140 total,

0 used, 262140 free, 1751888 cached

PID USER

PR NI VIRT RES SHR S %CPU %MEM

TIME+ COMMAND

1193 root

20 0 123m 18m 5664 S 4.3 0.5 2:54.93 Xorg

1919 kp

20 0 1148m 86m 30m S 2.3 2.3 2:01.01 compiz

2585 kp

20 0 530m 23m 12m S 2.3 0.6 0:48.35 gnome-terminal

2372 kp

20 0 399m 13m 9.9m S 0.3 0.4 0:01.79 update-notifier

3028 root

20 0

0 S 0.3 0.0 0:01.91 kworker/u:0

3439 root

20 0

0 S 0.3 0.0 0:00.54 kworker/0:1

1 root

20 0 24456 2448 1372 S 0.0 0.1 0:00.66 init

2 root

20 0

0 S 0.0 0.0 0:00.00 kthreadd

3 root

20 0

0 S 0.0 0.0 0:00.32 ksoftirqd/0

6 root

rt 0

0 S 0.0 0.0 0:00.00 migration/0

7 root

rt 0

0 S 0.0 0.0 0:00.02 watchdog/0

8 root

rt 0

0 S 0.0 0.0 0:00.55 migration/1

10 root

20 0

0 S 0.0 0.0 0:00.20 ksoftirqd/1

11 root

rt 0

0 S 0.0 0.0 0:00.02 watchdog/1

12 root

rt 0

0 S 0.0 0.0 0:00.00 migration/2

14 root

20 0

0 S 0.0 0.0 0:00.29 ksoftirqd/2

15 root

rt 0

0 S 0.0 0.0 0:00.02 watchdog/2

9. Use ps aeH to display the process hierarchy. Look for the init process. See if you
can identify important system daemons. Can you also identify your shell and its
subprocesses?

>ps -aeH

PID TTY

TIME CMD

2?

00:00:00 kthreadd

3?

00:00:00 ksoftirqd/0

6?

00:00:00 migration/0

7?

00:00:00 watchdog/0

8?

00:00:00 migration/1

10 ?

00:00:00 ksoftirqd/1

11 ?

00:00:00 watchdog/1

12 ?

00:00:00 migration/2

14 ?

00:00:00 ksoftirqd/2

15 ?

00:00:00 watchdog/2

16 ?

00:00:00 migration/3

18 ?

00:00:00 ksoftirqd/3

19 ?

00:00:00 watchdog/3

20 ?

00:00:00 cpuset

21 ?

00:00:00 khelper

22 ?

00:00:00 kdevtmpfs

23 ?

00:00:00 netns

25 ?

00:00:00 sync_supers

26 ?

00:00:00 bdi-default

27 ?

00:00:00 kintegrityd

28 ?

00:00:00 kblockd

29 ?

00:00:00 ata_sff

30 ?

00:00:00 khubd

31 ?

00:00:00 md

34 ?

00:00:00 khungtaskd

35 ?

00:00:00 kswapd0

36 ?

00:00:00 ksmd

37 ?

00:00:00 khugepaged

38 ?

00:00:00 fsnotify_mark

39 ?

00:00:00 ecryptfs-kthrea

40 ?

00:00:00 crypto

49 ?

00:00:00 kthrotld

52 ?

00:00:01 kworker/2:1

53 ?

00:00:00 scsi_eh_0

54 ?

00:00:00 scsi_eh_1

55 ?

00:00:00 scsi_eh_2

56 ?

00:00:00 scsi_eh_3

57 ?

00:00:00 scsi_eh_4

58 ?

00:00:00 scsi_eh_5

62 ?

00:00:02 kworker/u:5

65 ?

00:00:00 binder

85 ?

00:00:00 deferwq

86 ?

00:00:00 charger_manager

87 ?

00:00:00 devfreq_wq

88 ?

00:00:04 kworker/1:1

277 ?

00:00:02 loop0

279 ?

00:00:00 jbd2/loop0-8

280 ?

00:00:00 ext4-dio-unwrit

600 ?

00:00:00 irq/41-mei

632 ?

00:00:00 cfg80211

634 ?

00:00:00 kpsmoused

653 ?

00:00:00 krfcommd

890 ?

00:00:00 kvm-irqfd-clean

1092 ?

00:00:00 hd-audio0

1554 ?

00:00:00 flush-7:0

1555 ?

00:00:00 flush-8:0

2443 ?

00:00:03 kworker/3:2

2766 ?

00:00:00 kworker/1:0

3028 ?

00:00:01 kworker/u:0

3091 ?

00:00:03 kworker/3:1

3439 ?

00:00:00 kworker/0:1

3652 ?

00:00:00 kworker/2:2

4076 ?

00:00:00 kworker/0:0

4095 ?

00:00:00 kworker/0:2

4100 ?

00:00:00 kworker/u:1

1?

00:00:00 init

270 ?

00:00:05 mount.ntfs

466 ?

00:00:00 upstart-udev-br

469 ?

00:00:00 udevd

2814 ?

00:00:00

udevd

2815 ?

00:00:00

udevd

590 ?

00:00:01 dbus-daemon

602 ?

00:00:00 bluetoothd

618 ?

00:00:00 avahi-daemon

620 ?

00:00:00

655 ?

00:00:00 rsyslogd

658 ?

00:00:00 cupsd

803 ?

00:00:00 modem-manager

844 ?

00:00:00 upstart-socket-

873 ?

00:00:01 NetworkManager

1611 ?

00:00:00

dnsmasq

3907 ?

00:00:00

dhclient

885 ?

00:00:00 polkitd

911 tty4

00:00:00 getty

920 tty5

00:00:00 getty

934 tty2

00:00:00 getty

939 tty3

00:00:00 getty

942 tty6

00:00:00 getty

957 ?

00:00:00 acpid

958 ?

00:00:00 whoopsie

961 ?

00:00:00 irqbalance

1009 ?

00:00:00 cron

1010 ?

00:00:00 atd

avahi-daemon

1088 ?

00:00:00 lightdm

1193 tty7

00:03:02

Xorg

1489 ?

00:00:00

lightdm

1839 ?

00:00:00

1874 ?

00:00:00

ssh-agent

1898 ?

00:00:03

gnome-settings-

1969 ?

00:00:03

1919 ?

00:02:04

2001 ?

00:00:00

2002 ?

00:00:02

1930 ?

00:00:00

polkit-gnome-au

1932 ?

00:00:00

gnome-fallback-

1933 ?

00:00:04

nm-applet

1934 ?

00:00:00

bluetooth-apple

1939 ?

00:00:06

nautilus

2273 ?

00:00:00

telepathy-indic

2372 ?

00:00:01

update-notifier

2473 ?

00:00:00

deja-dup-monito

1112 ?

00:00:01 wpa_supplicant

1205 tty1

00:00:00 getty

1213 ?

00:00:00 accounts-daemon

1231 ?

00:00:00 console-kit-dae

1352 ?

00:00:00 upowerd

1496 ?

00:00:00 colord

gnome-session

syndaemon
compiz
sh
gtk-window-deco

1548 ?

00:00:00 rtkit-daemon

1828 ?

00:00:00 gnome-keyring-d

1877 ?

00:00:00 dbus-launch

1878 ?

00:00:01 dbus-daemon

1880 ?

00:00:00 at-spi-bus-laun

1884 ?

00:00:00

1887 ?

00:00:00 at-spi2-registr

1906 ?

00:00:00 gvfsd

1910 ?

00:00:00 gvfsd-fuse

1925 ?

00:00:00 dconf-service

1950 ?

00:00:00 gvfs-udisks2-vo

1953 ?

00:00:01 udisksd

1974 ?

00:00:00 pulseaudio

2009 ?

00:00:00

1977 ?

00:00:00 gvfs-afc-volume

1982 ?

00:00:00 gvfs-gphoto2-vo

1988 ?

00:00:00 gconfd-2

1991 ?

00:00:02 bamfdaemon

1996 ?

00:00:00 gvfsd-trash

2011 ?

00:00:00 gvfsd-burn

2016 ?

00:00:11 unity-panel-ser

2018 ?

00:00:05 hud-service

2031 ?

00:00:00 indicator-sessi

2033 ?

00:00:00 indicator-print

dbus-daemon

gconf-helper

2036 ?

00:00:00 indicator-messa

2037 ?

00:00:00 indicator-datet

2046 ?

00:00:00 indicator-sound

2047 ?

00:00:00 indicator-appli

2063 ?

00:00:00 evolution-sourc

2084 ?

00:00:00 geoclue-master

2096 ?

00:00:00 ubuntu-geoip-pr

2124 ?

00:00:00 unity-webapps-s

2142 ?

00:00:00 unity-applicati

2149 ?

00:00:00 unity-gwibber-d

2150 ?

00:00:00 unity-music-dae

2151 ?

00:00:00 unity-lens-phot

2152 ?

00:00:00 unity-shopping-

2153 ?

00:00:00 unity-files-dae

2154 ?

00:00:00 unity-lens-vide

2202 ?

00:00:00 zeitgeist-daemo

2214 ?

00:00:00 zeitgeist-fts

2222 ?

00:00:00

2216 ?

00:00:00 zeitgeist-datah

2235 ?

00:00:00 unity-musicstor

2237 ?

00:00:00 unity-scope-gdo

2259 ?

00:00:00 unity-scope-vid

2280 ?

00:00:00 mission-control

2286 ?

00:00:00 signon-ui

cat

2315 ?

00:00:00 ubuntuone-syncd

2355 ?

00:00:02 mount.ntfs

2366 ?

00:00:00 gvfsd-metadata

2382 ?

00:00:00 system-service-

2426 ?

00:00:02 notify-osd

2431 ?

00:00:00 gnome-screensav

2585 ?

00:00:50 gnome-terminal

2589 ?

00:00:00

2590 pts/0

00:00:00

3540 pts/0

00:00:00

3541 pts/0

00:00:00

4122 ?

00:00:00

gnome-pty-helpe
bash
sudo
apt-get
dpkg <defunct>

4002 pts/1

00:00:00

bash

4091 pts/1

00:00:01

top

4092 pts/1

00:00:00

top

4094 pts/1

00:00:00

top

4565 pts/1

00:00:00

ps

2928 ?

00:00:06 evince

2934 ?

00:00:00 evinced

3037 ?

00:00:00 oosplash

3058 ?

00:00:38

soffice.bin

10. Combine ps fae with grep to show all processes that you are executing, with

the exception of the ps fae and grep commands.

>ps -fae | grep <username>

>Ex:

ps -fae | grep kp

Output:

root

634

2 0 09:44 ?

00:00:00 [kpsmoused]

kp

1828

1 0 09:44 ?

00:00:00 /usr/bin/gnome-keyring-daemon --daemonize --login

kp

1839 1489 0 09:44 ?

00:00:00 gnome-session --session=ubuntu

kp
1874 1839 0 09:44 ?
00:00:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exitwith-session gnome-session --session=ubuntu
kp
1877
1 0 09:44 ?
session --session=ubuntu

00:00:00 /usr/bin/dbus-launch --exit-with-session gnome-

kp
1878
1 0 09:44 ?
address 7 --session

00:00:01 //bin/dbus-daemon --fork --print-pid 5 --print-

kp

00:00:00 /usr/lib/at-spi2-core/at-spi-bus-launcher

1880

1 0 09:44 ?

kp
1884 1880 0 09:44 ?
00:00:00 /bin/dbus-daemon --config-file=/etc/atspi2/accessibility.conf --nofork --print-address 3
kp
1887
session

1 0 09:44 ?

kp
1898 1839 0 09:44 ?
daemon

00:00:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-

00:00:03 /usr/lib/gnome-settings-daemon/gnome-settings-

kp

1906

1 0 09:44 ?

00:00:00 /usr/lib/gvfs/gvfsd

kp

1910

1 0 09:44 ?

00:00:00 /usr/lib/gvfs//gvfsd-fuse -f /run/user/kp/gvfs

kp

1919 1839 1 09:44 ?

kp

1925

1 0 09:44 ?

00:02:07 compiz
00:00:00 /usr/lib/dconf/dconf-service

kp
1930 1839 0 09:44 ?
authentication-agent-1

00:00:00 /usr/lib/policykit-1-gnome/polkit-gnome-

kp
1932 1839 0 09:44 ?
mount-helper

00:00:00 /usr/lib/gnome-settings-daemon/gnome-fallback-

kp

1933 1839 0 09:44 ?

00:00:04 nm-applet

kp

1934 1839 0 09:44 ?

00:00:00 bluetooth-applet

kp

1939 1839 0 09:44 ?

00:00:06 nautilus -n

kp

1950

kp

1969 1898 0 09:44 ?

kp

1974

1 0 09:44 ?

00:00:00 /usr/bin/pulseaudio --start --log-target=syslog

kp

1977

1 0 09:44 ?

00:00:00 /usr/lib/gvfs/gvfs-afc-volume-monitor

kp

1982

1 0 09:44 ?

00:00:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor

kp

1988

1 0 09:44 ?

00:00:00 /usr/lib/x86_64-linux-gnu/gconf/gconfd-2

kp

1991

1 0 09:44 ?

00:00:02 /usr/lib/bamf/bamfdaemon

1 0 09:44 ?

kp
1996
1 0 09:44 ?
/org/gtk/gvfs/exec_spaw/0

00:00:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
00:00:03 syndaemon -i 2.0 -K -R -t

00:00:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.7

kp

2001 1919 0 09:44 ?

00:00:00 /bin/sh -c /usr/bin/gtk-window-decorator

kp

2002 2001 0 09:44 ?

00:00:02 /usr/bin/gtk-window-decorator

kp

2009 1974 0 09:44 ?

00:00:00 /usr/lib/pulseaudio/pulse/gconf-helper

kp
2011
1 0 09:44 ?
/org/gtk/gvfs/exec_spaw/1

00:00:00 /usr/lib/gvfs/gvfsd-burn --spawner :1.7

kp

00:00:11 /usr/lib/unity/unity-panel-service

2016

1 0 09:44 ?

kp

2018

1 0 09:44 ?

00:00:05 /usr/lib/indicator-appmenu/hud-service

kp

2031

1 0 09:44 ?

00:00:00 /usr/lib/indicator-session/indicator-session-service

kp

2033

1 0 09:44 ?

00:00:00 /usr/lib/indicator-printers/indicator-printers-service

kp
2036
service

1 0 09:44 ?

00:00:00 /usr/lib/indicator-messages/indicator-messages-

kp

2037

1 0 09:44 ?

00:00:00 /usr/lib/indicator-datetime/indicator-datetime-service

kp

2046

1 0 09:44 ?

00:00:00 /usr/lib/indicator-sound/indicator-sound-service

kp
2047
service

1 0 09:44 ?

00:00:00 /usr/lib/x86_64-linux-gnu/indicator-application-

kp

2063

1 0 09:44 ?

00:00:00 /usr/lib/evolution/evolution-source-registry

kp

2084

1 0 09:44 ?

00:00:00 /usr/lib/geoclue/geoclue-master

kp

2096

1 0 09:44 ?

00:00:00 /usr/lib/ubuntu-geoip/ubuntu-geoip-provider

kp

2124

1 0 09:45 ?

00:00:00 /usr/lib/libunity-webapps/unity-webapps-service

kp
2142
daemon

1 0 09:45 ?

00:00:00 /usr/lib/unity-lens-applications/unity-applications-

kp

2149

1 0 09:45 ?

00:00:00 /usr/lib/gwibber/unity-gwibber-daemon

kp

2150

1 0 09:45 ?

00:00:00 /usr/lib/x86_64-linux-gnu/unity-music-daemon

kp
2151
lens-photos

1 0 09:45 ?

00:00:00 /usr/bin/python3 /usr/lib/unity-lens-photos/unity-

kp

2152

1 0 09:45 ?

00:00:00 /usr/lib/x86_64-linux-gnu/unity-shopping-daemon

kp

2153

1 0 09:45 ?

00:00:00 /usr/lib/unity-lens-files/unity-files-daemon

kp
video

2154

1 0 09:45 ?

00:00:00 /usr/bin/python /usr/lib/unity-lens-video/unity-lens-

kp

2202

1 0 09:45 ?

00:00:00 /usr/bin/zeitgeist-daemon

kp

2214

1 0 09:45 ?

00:00:00 /usr/lib/zeitgeist/zeitgeist-fts

kp

2216

1 0 09:45 ?

00:00:00 zeitgeist-datahub

kp

2222 2214 0 09:45 ?

00:00:00 /bin/cat

kp

2235

1 0 09:45 ?

00:00:00 /usr/lib/x86_64-linux-gnu/unity-musicstore-daemon

kp
2237
scope-gdocs

1 0 09:45 ?

00:00:00 /usr/bin/python3 /usr/lib/unity-lens-files/unity-

kp
2259
1 0 09:45 ?
00:00:00 /usr/bin/python /usr/lib/unity-scope-videoremote/unity-scope-video-remote
kp

2273 1839 0 09:45 ?

kp

2280

1 0 09:45 ?

00:00:00 /usr/lib/telepathy/mission-control-5

kp

2286

1 0 09:45 ?

00:00:00 /usr/bin/signon-ui

kp
2315
1 0 09:45 ?
client/ubuntuone-syncdaemon

00:00:00 telepathy-indicator

00:00:00 /usr/bin/python /usr/lib/ubuntuone-

root
2355
1 0 09:45 ?
00:00:02 /sbin/mount.ntfs /dev/sda6
/media/kp/01CDF88B2E46B1E0 -o
rw,nosuid,nodev,uhelper=udisks2,uid=1000,gid=1000,dmask=0077,fmask=0177
kp

2366

1 0 09:45 ?

kp

2372 1839 0 09:45 ?

kp

2426

1 0 09:45 ?

00:00:02 /usr/lib/notify-osd/notify-osd

kp

2431

1 0 09:45 ?

00:00:00 /usr/bin/gnome-screensaver --no-daemon

kp
2473 1839 0 09:46 ?
monitor
kp

2585

1 0 09:48 ?

kp

2589 2585 0 09:48 ?

kp

2590 2585 0 09:48 pts/0

00:00:00 /usr/lib/gvfs/gvfsd-metadata
00:00:01 update-notifier

00:00:00 /usr/lib/x86_64-linux-gnu/deja-dup/deja-dup-

00:00:53 gnome-terminal
00:00:00 gnome-pty-helper
00:00:00 bash

kp
2928
1 0 10:03 ?
Linux_assignment_.pdf

00:00:06 evince /media/kp/01CDF88B2E46B1E0/EiTRA/Latest

kp

2934

1 0 10:03 ?

00:00:00 /usr/lib/evince/evinced

kp

3037

1 0 10:05 ?

00:00:00 /usr/lib/libreoffice/program/oosplash --writer

/media/kp/01CDF88B2E46B1E0/EiTRA/Solved/a4.docx
kp
3058 3037 0 10:05 ?
00:00:41 /usr/lib/libreoffice/program/soffice.bin --writer
/media/kp/01CDF88B2E46B1E0/EiTRA/Solved/a4.docx --splash-pipe=6
kp

4002 2585 0 11:13 pts/1

00:00:00 bash

kp

4091 4002 0 11:20 pts/1

00:00:01 top

kp

4092 4002 0 11:21 pts/1

00:00:00 top

kp

4094 4002 0 11:21 pts/1

00:00:00 top

kp

4647

kp

4679 4002 0 11:31 pts/1

00:00:00 ps -fae

kp

4680 4002 0 11:31 pts/1

00:00:00 grep --color=auto kp

1 0 11:27 ?

00:00:01 /usr/bin/python /usr/share/oneconf/oneconf-service

kp@ubuntu:~$ clear

kp@ubuntu:~$ ps -fae | grep kp


root

634

2 0 09:44 ?

00:00:00 [kpsmoused]

kp

1828

1 0 09:44 ?

00:00:00 /usr/bin/gnome-keyring-daemon --daemonize --login

kp

1839 1489 0 09:44 ?

00:00:00 gnome-session --session=ubuntu

kp
1874 1839 0 09:44 ?
00:00:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exitwith-session gnome-session --session=ubuntu
kp
1877
1 0 09:44 ?
session --session=ubuntu

00:00:00 /usr/bin/dbus-launch --exit-with-session gnome-

kp
1878
1 0 09:44 ?
address 7 --session

00:00:02 //bin/dbus-daemon --fork --print-pid 5 --print-

kp

00:00:00 /usr/lib/at-spi2-core/at-spi-bus-launcher

1880

1 0 09:44 ?

kp
1884 1880 0 09:44 ?
00:00:00 /bin/dbus-daemon --config-file=/etc/atspi2/accessibility.conf --nofork --print-address 3
kp

1887

1 0 09:44 ?

00:00:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-

session
kp
1898 1839 0 09:44 ?
daemon

00:00:03 /usr/lib/gnome-settings-daemon/gnome-settings-

kp

1906

1 0 09:44 ?

00:00:00 /usr/lib/gvfs/gvfsd

kp

1910

1 0 09:44 ?

00:00:00 /usr/lib/gvfs//gvfsd-fuse -f /run/user/kp/gvfs

kp

1919 1839 1 09:44 ?

kp

1925

1 0 09:44 ?

00:02:08 compiz
00:00:00 /usr/lib/dconf/dconf-service

kp
1930 1839 0 09:44 ?
authentication-agent-1

00:00:00 /usr/lib/policykit-1-gnome/polkit-gnome-

kp
1932 1839 0 09:44 ?
mount-helper

00:00:00 /usr/lib/gnome-settings-daemon/gnome-fallback-

kp

1933 1839 0 09:44 ?

00:00:04 nm-applet

kp

1934 1839 0 09:44 ?

00:00:00 bluetooth-applet

kp

1939 1839 0 09:44 ?

00:00:06 nautilus -n

kp

1950

kp

1969 1898 0 09:44 ?

kp

1974

1 0 09:44 ?

00:00:00 /usr/bin/pulseaudio --start --log-target=syslog

kp

1977

1 0 09:44 ?

00:00:00 /usr/lib/gvfs/gvfs-afc-volume-monitor

kp

1982

1 0 09:44 ?

00:00:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor

kp

1988

1 0 09:44 ?

00:00:00 /usr/lib/x86_64-linux-gnu/gconf/gconfd-2

kp

1991

1 0 09:44 ?

00:00:02 /usr/lib/bamf/bamfdaemon

1 0 09:44 ?

kp
1996
1 0 09:44 ?
/org/gtk/gvfs/exec_spaw/0

00:00:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
00:00:03 syndaemon -i 2.0 -K -R -t

00:00:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.7

kp

2001 1919 0 09:44 ?

00:00:00 /bin/sh -c /usr/bin/gtk-window-decorator

kp

2002 2001 0 09:44 ?

00:00:02 /usr/bin/gtk-window-decorator

kp

2009 1974 0 09:44 ?

00:00:00 /usr/lib/pulseaudio/pulse/gconf-helper

kp

2011

1 0 09:44 ?

00:00:00 /usr/lib/gvfs/gvfsd-burn --spawner :1.7

/org/gtk/gvfs/exec_spaw/1
kp

2016

1 0 09:44 ?

00:00:11 /usr/lib/unity/unity-panel-service

kp

2018

1 0 09:44 ?

00:00:05 /usr/lib/indicator-appmenu/hud-service

kp

2031

1 0 09:44 ?

00:00:00 /usr/lib/indicator-session/indicator-session-service

kp

2033

1 0 09:44 ?

00:00:00 /usr/lib/indicator-printers/indicator-printers-service

kp
2036
service

1 0 09:44 ?

00:00:00 /usr/lib/indicator-messages/indicator-messages-

kp

2037

1 0 09:44 ?

00:00:00 /usr/lib/indicator-datetime/indicator-datetime-service

kp

2046

1 0 09:44 ?

00:00:00 /usr/lib/indicator-sound/indicator-sound-service

kp
2047
service

1 0 09:44 ?

00:00:00 /usr/lib/x86_64-linux-gnu/indicator-application-

kp

2063

1 0 09:44 ?

00:00:00 /usr/lib/evolution/evolution-source-registry

kp

2084

1 0 09:44 ?

00:00:00 /usr/lib/geoclue/geoclue-master

kp

2096

1 0 09:44 ?

00:00:00 /usr/lib/ubuntu-geoip/ubuntu-geoip-provider

kp

2124

1 0 09:45 ?

00:00:00 /usr/lib/libunity-webapps/unity-webapps-service

kp
2142
daemon

1 0 09:45 ?

00:00:00 /usr/lib/unity-lens-applications/unity-applications-

kp

2149

1 0 09:45 ?

00:00:00 /usr/lib/gwibber/unity-gwibber-daemon

kp

2150

1 0 09:45 ?

00:00:00 /usr/lib/x86_64-linux-gnu/unity-music-daemon

kp
2151
lens-photos

1 0 09:45 ?

00:00:00 /usr/bin/python3 /usr/lib/unity-lens-photos/unity-

kp

2152

1 0 09:45 ?

00:00:00 /usr/lib/x86_64-linux-gnu/unity-shopping-daemon

kp

2153

1 0 09:45 ?

00:00:00 /usr/lib/unity-lens-files/unity-files-daemon

kp
video

2154

1 0 09:45 ?

00:00:00 /usr/bin/python /usr/lib/unity-lens-video/unity-lens-

kp

2202

1 0 09:45 ?

00:00:00 /usr/bin/zeitgeist-daemon

kp

2214

1 0 09:45 ?

00:00:00 /usr/lib/zeitgeist/zeitgeist-fts

kp

2216

1 0 09:45 ?

00:00:00 zeitgeist-datahub

kp

2222 2214 0 09:45 ?

kp

2235

1 0 09:45 ?

00:00:00 /usr/lib/x86_64-linux-gnu/unity-musicstore-daemon

kp
2237
scope-gdocs

1 0 09:45 ?

00:00:00 /usr/bin/python3 /usr/lib/unity-lens-files/unity-

00:00:00 /bin/cat

kp
2259
1 0 09:45 ?
00:00:00 /usr/bin/python /usr/lib/unity-scope-videoremote/unity-scope-video-remote
kp

2273 1839 0 09:45 ?

kp

2280

1 0 09:45 ?

00:00:00 /usr/lib/telepathy/mission-control-5

kp

2286

1 0 09:45 ?

00:00:00 /usr/bin/signon-ui

kp
2315
1 0 09:45 ?
client/ubuntuone-syncdaemon

00:00:00 telepathy-indicator

00:00:00 /usr/bin/python /usr/lib/ubuntuone-

root
2355
1 0 09:45 ?
00:00:02 /sbin/mount.ntfs /dev/sda6
/media/kp/01CDF88B2E46B1E0 -o
rw,nosuid,nodev,uhelper=udisks2,uid=1000,gid=1000,dmask=0077,fmask=0177
kp

2366

1 0 09:45 ?

kp

2372 1839 0 09:45 ?

kp

2426

1 0 09:45 ?

00:00:02 /usr/lib/notify-osd/notify-osd

kp

2431

1 0 09:45 ?

00:00:00 /usr/bin/gnome-screensaver --no-daemon

kp
2473 1839 0 09:46 ?
monitor
kp

2585

1 0 09:48 ?

kp

2589 2585 0 09:48 ?

kp

2590 2585 0 09:48 pts/0

00:00:00 /usr/lib/gvfs/gvfsd-metadata
00:00:01 update-notifier

00:00:00 /usr/lib/x86_64-linux-gnu/deja-dup/deja-dup-

00:00:53 gnome-terminal
00:00:00 gnome-pty-helper
00:00:00 bash

kp

2928

1 0 10:03 ?

00:00:06 evince /media/kp/01CDF88B2E46B1E0/EiTRA/Latest

Linux_assignment_.pdf
kp

2934

1 0 10:03 ?

00:00:00 /usr/lib/evince/evinced

kp
3037
1 0 10:05 ?
00:00:00 /usr/lib/libreoffice/program/oosplash --writer
/media/kp/01CDF88B2E46B1E0/EiTRA/Solved/a4.docx
kp
3058 3037 0 10:05 ?
00:00:43 /usr/lib/libreoffice/program/soffice.bin --writer
/media/kp/01CDF88B2E46B1E0/EiTRA/Solved/a4.docx --splash-pipe=6
kp

4002 2585 0 11:13 pts/1

00:00:00 bash

kp

4091 4002 0 11:20 pts/1

00:00:01 top

kp

4092 4002 0 11:21 pts/1

00:00:00 top

kp

4094 4002 0 11:21 pts/1

00:00:00 top

kp

4647

kp

4684 4002 0 11:33 pts/1

00:00:00 ps -fae

kp

4685 4002 0 11:33 pts/1

00:00:00 grep --color=auto kp

1 0 11:27 ?

00:00:01 /usr/bin/python /usr/share/oneconf/oneconf-service

11. Start a sleep 300 process running in the background. Log off the server, and log
back in again. List all the processes that you are running. What happened to your
sleep process? Now repeat, except this time start by running nohup sleep 300.

>When we execute the command sleep 300 and relog-in to machine,process sleep was already
terminated.
>When we execute the command nohup sleep 300 and relog-in to machine,process sleep is still
running.

12. Multiple jobs can be issued from the same command line using the operators ;,
&& and ||. Try combining the commands cat nonexistent and echo hello using

each of these operators. Reverse the order of the commands and try again. What
are the rules about when the commands will be executed?

kp@ubuntu:~$ cat kishan || echo hello


hi
hello
good afternoon

kp@ubuntu:~$ cat kishan && echo hello


hi
hello
good afternoon
hello
kp@ubuntu:~$ cat kishan ; echo hello
hi
hello
good afternoon
hello

kp@ubuntu:~$ error ; echo hello


No command 'error' found, did you mean:
Command 'perror' from package 'mysql-server-5.5' (main)
error: command not found
hello

kp@ubuntu:~$ error && echo hello


No command 'error' found, did you mean:
Command 'perror' from package 'mysql-server-5.5' (main)
error: command not found

kp@ubuntu:~$ error || echo hello


No command 'error' found, did you mean:
Command 'perror' from package 'mysql-server-5.5' (main)
error: command not found
hello

kp@ubuntu:~$ cat kishan && error


hi
hello
good afternoon
No command 'error' found, did you mean:
Command 'perror' from package 'mysql-server-5.5' (main)
error: command not found

kp@ubuntu:~$ cat kishan || error


hi
hello
good afternoon

kp@ubuntu:~$ cat kishan ; error


hi
hello
good afternoon
No command 'error' found, did you mean:
Command 'perror' from package 'mysql-server-5.5' (main)
error: command not found

kp@ubuntu:~$ cat kishan && echo hello && cat kishan


hi
hello
good afternoon
hello
hi
hello
good afternoon

13. What does the xargs command do? Can you combine it with find and grep to
find yet another way of searching all files in the /home subdirectory tree for the
word hello?

14. What does the cut command do? Can you use it together with w to produce a
list of login names and CPU times corresponding to each active process? Can you
now (all on the same command line) use sort and head or tail to find the user
whose process is using the most CPU?

>cut - remove sections from each line of files

>

S-ar putea să vă placă și