SaveText.Ru

Без имени
  1. [[email protected] ~]$ ps -e -o ruid,euid,cmd
  2.  RUID  EUID CMD
  3.     0     0 /usr/lib/systemd/systemd --switched-root --system --deserialize 22
  4.     0     0 [kthreadd]
  5.     0     0 [kworker/0:0H]
  6.     0     0 [ksoftirqd/0]
  7.     0     0 [migration/0]
  8.     0     0 [rcu_bh]
  9.     0     0 [rcu_sched]
  10.     0     0 [lru-add-drain]
  11.     0     0 [watchdog/0]
  12.     0     0 [kdevtmpfs]
  13.     0     0 [netns]
  14.     0     0 [khungtaskd]
  15.     0     0 [writeback]
  16.     0     0 [kintegrityd]
  17.     0     0 [bioset]
  18.     0     0 [bioset]
  19.     0     0 [bioset]
  20.     0     0 [kblockd]
  21.     0     0 [md]
  22.     0     0 [edac-poller]
  23.     0     0 [watchdogd]
  24.     0     0 [kswapd0]
  25.     0     0 [ksmd]
  26.     0     0 [khugepaged]
  27.     0     0 [crypto]
  28.     0     0 [kthrotld]
  29.     0     0 [kmpath_rdacd]
  30.     0     0 [kaluad]
  31.     0     0 [kpsmoused]
  32.     0     0 [ipv6_addrconf]
  33.     0     0 [deferwq]
  34.     0     0 [kauditd]
  35.     0     0 [ata_sff]
  36.     0     0 [scsi_eh_0]
  37.     0     0 [scsi_tmf_0]
  38.     0     0 [scsi_eh_1]
  39.     0     0 [scsi_tmf_1]
  40.     0     0 [scsi_eh_2]
  41.     0     0 [scsi_tmf_2]
  42.     0     0 [kdmflush]
  43.     0     0 [bioset]
  44.     0     0 [kdmflush]
  45.     0     0 [bioset]
  46.     0     0 [bioset]
  47.     0     0 [xfsalloc]
  48.     0     0 [xfs_mru_cache]
  49.     0     0 [xfs-buf/dm-0]
  50.     0     0 [xfs-data/dm-0]
  51.     0     0 [xfs-conv/dm-0]
  52.     0     0 [xfs-cil/dm-0]
  53.     0     0 [xfs-reclaim/dm-]
  54.     0     0 [xfs-log/dm-0]
  55.     0     0 [xfs-eofblocks/d]
  56.     0     0 [xfsaild/dm-0]
  57.     0     0 [kworker/0:1H]
  58.     0     0 /usr/lib/systemd/systemd-journald
  59.     0     0 /usr/sbin/lvmetad -f
  60.     0     0 /usr/lib/systemd/systemd-udevd
  61.     0     0 [xfs-buf/sda1]
  62.     0     0 [xfs-data/sda1]
  63.     0     0 [xfs-conv/sda1]
  64.     0     0 [xfs-cil/sda1]
  65.     0     0 [xfs-reclaim/sda]
  66.     0     0 [xfs-log/sda1]
  67.     0     0 [xfs-eofblocks/s]
  68.     0     0 [xfsaild/sda1]
  69.     0     0 /sbin/auditd
  70.     0     0 /sbin/audispd
  71.     0     0 /usr/sbin/sedispatch
  72.     0     0 [rpciod]
  73.     0     0 [xprtiod]
  74.   999   999 /usr/lib/polkit-1/polkitd --no-debug
  75.     0     0 /usr/lib/systemd/systemd-logind
  76.    70    70 avahi-daemon: running [linux.local]
  77.     0     0 /usr/libexec/udisks2/udisksd
  78.    32    32 /sbin/rpcbind -w
  79.     0     0 /usr/sbin/smartd -n -q never
  80.     0     0 /sbin/rngd -f
  81.     0     0 /usr/sbin/abrtd -d -s
  82.     0     0 /usr/bin/abrt-watch-log -F Backtrace /var/log/Xorg.0.log -- /usr/bin
  83.    70    70 avahi-daemon: chroot helper
  84.   991   991 /usr/sbin/chronyd
  85.     0     0 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.
  86.   172   172 /usr/libexec/rtkit-daemon
  87.    81    81 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfil
  88.     0     0 /usr/libexec/accounts-daemon
  89.   996   996 /usr/bin/lsmd -d
  90.     0     0 /usr/bin/abrt-watch-log -F BUG: WARNING: at WARNING: CPU: INFO: poss
  91.     0     0 /usr/sbin/ModemManager
  92.     0     0 /usr/sbin/gssproxy -D
  93.     0     0 /usr/bin/python2 -Es /usr/sbin/firewalld --nofork --nopid
  94.     0     0 /bin/bash /usr/sbin/ksmtuned
  95.     0     0 /usr/sbin/NetworkManager --no-daemon
  96.     0     0 /usr/sbin/cupsd -f
  97.     0     0 /usr/sbin/sshd -D
  98.     0     0 /usr/bin/python2 -Es /usr/sbin/tuned -l -P
  99.     0     0 /usr/sbin/rsyslogd -n
  100.     0     0 /usr/sbin/libvirtd
  101.     0     0 /usr/sbin/crond -n
  102.     0     0 /usr/sbin/atd -f
  103.     0     0 /usr/libexec/postfix/master -w
  104.    89    89 qmgr -l -t unix -u
  105.    99    99 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf
  106.     0     0 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf
  107.     0     0 /usr/sbin/gdm
  108.     0     0 /usr/bin/X :0 -background none -noreset -audit 4 -verbose -auth /run
  109.     0     0 /usr/libexec/upowerd
  110.     0     0 /usr/libexec/boltd
  111.     0     0 /usr/libexec/packagekitd
  112.     0     0 /usr/sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log -c /etc/w
  113.   995   995 /usr/libexec/colord
  114.     0     0 gdm-session-worker [pam/gdm-password]
  115.  1000  1000 /usr/bin/gnome-keyring-daemon --daemonize --login
  116.  1000  1000 /usr/libexec/gnome-session-binary --session gnome-classic
  117.  1000  1000 dbus-launch --sh-syntax --exit-with-session
  118.  1000  1000 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --sessio
  119.  1000  1000 /usr/libexec/imsettings-daemon
  120.  1000  1000 /usr/libexec/gvfsd
  121.  1000  1000 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
  122.  1000  1000 /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "env GNOME_SHELL_
  123.  1000  1000 /usr/libexec/at-spi-bus-launcher
  124.  1000  1000 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/acces
  125.  1000  1000 /usr/libexec/at-spi2-registryd --use-gnome-session
  126.  1000  1000 /usr/bin/gnome-shell
  127.  1000  1000 /usr/bin/pulseaudio --start --log-target=syslog
  128.  1000  1000 ibus-daemon --xim --panel disable
  129.  1000  1000 /usr/libexec/ibus-dconf
  130.  1000  1000 /usr/libexec/ibus-x11 --kill-daemon
  131.  1000  1000 /usr/libexec/ibus-portal
  132.  1000  1000 /usr/libexec/xdg-permission-store
  133.  1000  1000 /usr/libexec/gnome-shell-calendar-server
  134.  1000  1000 /usr/libexec/evolution-source-registry
  135.  1000  1000 /usr/libexec/mission-control-5
  136.  1000  1000 /usr/libexec/gvfs-udisks2-volume-monitor
  137.  1000  1000 /usr/libexec/goa-daemon
  138.  1000  1000 /usr/libexec/gvfs-mtp-volume-monitor
  139.  1000  1000 /usr/libexec/gvfs-goa-volume-monitor
  140.  1000  1000 /usr/libexec/goa-identity-service
  141.  1000  1000 /usr/libexec/gvfs-gphoto2-volume-monitor
  142.  1000  1000 /usr/libexec/gvfs-afc-volume-monitor
  143.  1000  1000 /usr/libexec/gsd-power
  144.  1000  1000 /usr/libexec/gsd-print-notifications
  145.  1000  1000 /usr/libexec/gsd-rfkill
  146.  1000  1000 /usr/libexec/gsd-screensaver-proxy
  147.  1000  1000 /usr/libexec/gsd-sharing
  148.  1000  1000 /usr/libexec/gsd-smartcard
  149.  1000  1000 /usr/libexec/gsd-xsettings
  150.  1000  1000 /usr/libexec/gsd-sound
  151.  1000  1000 /usr/libexec/gsd-wacom
  152.  1000  1000 /usr/libexec/gsd-account
  153.  1000  1000 /usr/libexec/gsd-clipboard
  154.  1000  1000 /usr/libexec/gsd-a11y-settings
  155.  1000  1000 /usr/libexec/gsd-datetime
  156.  1000  1000 /usr/libexec/gsd-color
  157.  1000  1000 /usr/libexec/gsd-keyboard
  158.  1000  1000 /usr/libexec/gsd-housekeeping
  159.  1000  1000 /usr/libexec/gsd-mouse
  160.  1000  1000 /usr/libexec/gsd-media-keys
  161.  1000  1000 /usr/libexec/gsd-printer
  162.  1000  1000 nautilus-desktop --force
  163.   990   990 /usr/libexec/geoclue -t 5
  164.  1000  1000 /usr/libexec/gvfsd-trash --spawner :1.4 /org/gtk/gvfs/exec_spaw/0
  165.  1000  1000 /usr/libexec/tracker-miner-fs
  166.  1000  1000 /usr/libexec/tracker-miner-apps
  167.  1000  1000 /usr/bin/gnome-software --gapplication-service
  168.  1000  1000 /usr/bin/seapplet
  169.  1000  1000 /usr/libexec/tracker-store
  170.  1000  1000 /usr/libexec/evolution/evolution-alarm-notify
  171.  1000  1000 /usr/libexec/tracker-extract
  172.  1000  1000 abrt-applet
  173.  1000  1000 /usr/libexec/tracker-miner-user-guides
  174.  1000  1000 /usr/libexec/gsd-disk-utility-notify
  175.  1000  1000 /usr/libexec/evolution-calendar-factory
  176.  1000  1000 /usr/libexec/ibus-engine-simple
  177.  1000  1000 /usr/libexec/dconf-service
  178.  1000  1000 /usr/libexec/gvfsd-burn --spawner :1.4 /org/gtk/gvfs/exec_spaw/1
  179.  1000  1000 /usr/libexec/gvfsd-metadata
  180.  1000  1000 /usr/libexec/evolution-calendar-factory-subprocess --factory all --b
  181.  1000  1000 /usr/libexec/evolution-addressbook-factory
  182.  1000  1000 /usr/libexec/evolution-addressbook-factory-subprocess --factory all
  183.     0     0 /usr/libexec/fwupd/fwupd
  184.  1000  1000 /usr/lib64/firefox/firefox
  185.  1000  1000 /usr/lib64/firefox/firefox -contentproc -childID 1 -isForBrowser -bo
  186.  1000  1000 /usr/libexec/gconfd-2
  187.     0     0 /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dh
  188.  1000  1000 /usr/lib64/firefox/firefox -contentproc -childID 4 -isForBrowser -bo
  189.  1000  1000 /usr/libexec/gvfsd-network --spawner :1.4 /org/gtk/gvfs/exec_spaw/2
  190.  1000  1000 /usr/libexec/gvfsd-dnssd --spawner :1.4 /org/gtk/gvfs/exec_spaw/4
  191.  1000  1000 /usr/bin/gedit --gapplication-service
  192.  1000  1000 /usr/lib64/firefox/firefox -contentproc -childID 6 -isForBrowser -bo
  193.  1000  1000 /usr/libexec/gnome-terminal-server
  194.  1000  1000 gnome-pty-helper
  195.  1000  1000 bash
  196.    89    89 pickup -l -t unix -u
  197.     0     0 [kworker/u2:2]
  198.     0     0 [kworker/0:1]
  199.     0     0 [kworker/u2:1]
  200.     0     0 [kworker/0:3]
  201.     0     0 [kworker/0:0]
  202.     0     0 sleep 60
  203.     0     0 /usr/lib/systemd/systemd-udevd
  204.     0     0 /usr/lib/systemd/systemd-udevd
  205.  1000  1000 ps -e -o ruid,euid,cmd
  206. [[email protected] ~]$ ps -e -o ruid,euid,cmd | xargs -l ./euid_ruid.sh
  207. /usr/lib/systemd/systemd
  208. [kthreadd]
  209. [kworker/0:0H]
  210. [ksoftirqd/0]
  211. [migration/0]
  212. [rcu_bh]
  213. [rcu_sched]
  214. [lru-add-drain]
  215. [watchdog/0]
  216. [kdevtmpfs]
  217. [netns]
  218. [khungtaskd]
  219. [writeback]
  220. [kintegrityd]
  221. [bioset]
  222. [bioset]
  223. [bioset]
  224. [kblockd]
  225. [md]
  226. [edac-poller]
  227. [watchdogd]
  228. [kswapd0]
  229. [ksmd]
  230. [khugepaged]
  231. [crypto]
  232. [kthrotld]
  233. [kmpath_rdacd]
  234. [kaluad]
  235. [kpsmoused]
  236. [ipv6_addrconf]
  237. [deferwq]
  238. [kauditd]
  239. [ata_sff]
  240. [scsi_eh_0]
  241. [scsi_tmf_0]
  242. [scsi_eh_1]
  243. [scsi_tmf_1]
  244. [scsi_eh_2]
  245. [scsi_tmf_2]
  246. [kdmflush]
  247. [bioset]
  248. [kdmflush]
  249. [bioset]
  250. [bioset]
  251. [xfsalloc]
  252. [xfs_mru_cache]
  253. [xfs-buf/dm-0]
  254. [xfs-data/dm-0]
  255. [xfs-conv/dm-0]
  256. [xfs-cil/dm-0]
  257. [xfs-reclaim/dm-]
  258. [xfs-log/dm-0]
  259. [xfs-eofblocks/d]
  260. [xfsaild/dm-0]
  261. [kworker/0:1H]
  262. /usr/lib/systemd/systemd-journald
  263. /usr/sbin/lvmetad
  264. /usr/lib/systemd/systemd-udevd
  265. [xfs-buf/sda1]
  266. [xfs-data/sda1]
  267. [xfs-conv/sda1]
  268. [xfs-cil/sda1]
  269. [xfs-reclaim/sda]
  270. [xfs-log/sda1]
  271. [xfs-eofblocks/s]
  272. [xfsaild/sda1]
  273. /sbin/auditd
  274. /sbin/audispd
  275. /usr/sbin/sedispatch
  276. [rpciod]
  277. [xprtiod]
  278. /usr/lib/polkit-1/polkitd
  279. /usr/lib/systemd/systemd-logind
  280. avahi-daemon:
  281. /usr/libexec/udisks2/udisksd
  282. /sbin/rpcbind
  283. /usr/sbin/smartd
  284. /sbin/rngd
  285. /usr/sbin/abrtd
  286. /usr/bin/abrt-watch-log
  287. avahi-daemon:
  288. /usr/sbin/chronyd
  289. /usr/sbin/alsactl
  290. /usr/libexec/rtkit-daemon
  291. /usr/bin/dbus-daemon
  292. /usr/libexec/accounts-daemon
  293. /usr/bin/lsmd
  294. /usr/bin/abrt-watch-log
  295. /usr/sbin/ModemManager
  296. /usr/sbin/gssproxy
  297. /usr/bin/python2
  298. /bin/bash
  299. /usr/sbin/NetworkManager
  300. /usr/sbin/cupsd
  301. /usr/sbin/sshd
  302. /usr/bin/python2
  303. /usr/sbin/rsyslogd
  304. /usr/sbin/libvirtd
  305. /usr/sbin/crond
  306. /usr/sbin/atd
  307. /usr/libexec/postfix/master
  308. qmgr
  309. /usr/sbin/dnsmasq
  310. /usr/sbin/dnsmasq
  311. /usr/sbin/gdm
  312. /usr/bin/X
  313. /usr/libexec/upowerd
  314. /usr/libexec/boltd
  315. /usr/libexec/packagekitd
  316. /usr/sbin/wpa_supplicant
  317. /usr/libexec/colord
  318. gdm-session-worker
  319. /usr/bin/gnome-keyring-daemon
  320. /usr/libexec/gnome-session-binary
  321. dbus-launch
  322. /usr/bin/dbus-daemon
  323. /usr/libexec/imsettings-daemon
  324. /usr/libexec/gvfsd
  325. /usr/libexec/gvfsd-fuse
  326. /usr/bin/ssh-agent
  327. /usr/libexec/at-spi-bus-launcher
  328. /usr/bin/dbus-daemon
  329. /usr/libexec/at-spi2-registryd
  330. /usr/bin/gnome-shell
  331. /usr/bin/pulseaudio
  332. ibus-daemon
  333. /usr/libexec/ibus-dconf
  334. /usr/libexec/ibus-x11
  335. /usr/libexec/ibus-portal
  336. /usr/libexec/xdg-permission-store
  337. /usr/libexec/gnome-shell-calendar-server
  338. /usr/libexec/evolution-source-registry
  339. /usr/libexec/mission-control-5
  340. /usr/libexec/gvfs-udisks2-volume-monitor
  341. /usr/libexec/goa-daemon
  342. /usr/libexec/gvfs-mtp-volume-monitor
  343. /usr/libexec/gvfs-goa-volume-monitor
  344. /usr/libexec/goa-identity-service
  345. /usr/libexec/gvfs-gphoto2-volume-monitor
  346. /usr/libexec/gvfs-afc-volume-monitor
  347. /usr/libexec/gsd-power
  348. /usr/libexec/gsd-print-notifications
  349. /usr/libexec/gsd-rfkill
  350. /usr/libexec/gsd-screensaver-proxy
  351. /usr/libexec/gsd-sharing
  352. /usr/libexec/gsd-smartcard
  353. /usr/libexec/gsd-xsettings
  354. /usr/libexec/gsd-sound
  355. /usr/libexec/gsd-wacom
  356. /usr/libexec/gsd-account
  357. /usr/libexec/gsd-clipboard
  358. /usr/libexec/gsd-a11y-settings
  359. /usr/libexec/gsd-datetime
  360. /usr/libexec/gsd-color
  361. /usr/libexec/gsd-keyboard
  362. /usr/libexec/gsd-housekeeping
  363. /usr/libexec/gsd-mouse
  364. /usr/libexec/gsd-media-keys
  365. /usr/libexec/gsd-printer
  366. nautilus-desktop
  367. /usr/libexec/geoclue
  368. /usr/libexec/gvfsd-trash
  369. /usr/libexec/tracker-miner-fs
  370. /usr/libexec/tracker-miner-apps
  371. /usr/bin/gnome-software
  372. /usr/bin/seapplet
  373. /usr/libexec/tracker-store
  374. /usr/libexec/evolution/evolution-alarm-notify
  375. /usr/libexec/tracker-extract
  376. abrt-applet
  377. /usr/libexec/tracker-miner-user-guides
  378. /usr/libexec/gsd-disk-utility-notify
  379. /usr/libexec/evolution-calendar-factory
  380. /usr/libexec/ibus-engine-simple
  381. /usr/libexec/dconf-service
  382. /usr/libexec/gvfsd-burn
  383. /usr/libexec/gvfsd-metadata
  384. /usr/libexec/evolution-calendar-factory-subprocess
  385. /usr/libexec/evolution-addressbook-factory
  386. /usr/libexec/evolution-addressbook-factory-subprocess
  387. /usr/libexec/fwupd/fwupd
  388. /usr/lib64/firefox/firefox
  389. /usr/lib64/firefox/firefox
  390. /usr/libexec/gconfd-2
  391. /sbin/dhclient
  392. /usr/lib64/firefox/firefox
  393. /usr/libexec/gvfsd-network
  394. /usr/libexec/gvfsd-dnssd
  395. /usr/bin/gedit
  396. /usr/lib64/firefox/firefox
  397. /usr/libexec/gnome-terminal-server
  398. gnome-pty-helper
  399. bash
  400. pickup
  401. [kworker/u2:2]
  402. [kworker/0:1]
  403. [kworker/u2:1]
  404. [kworker/0:0]
  405. [kworker/0:2]
  406. sleep
  407. ps
  408. xargs
  409.  
  410.  
  411. СКРИПТ euid_ruid.sh
  412. #!/bin/bash
  413. if [ $1 == $2 ]; then
  414.         echo "$3"
  415. fi
  416.  

Share with your friends:

Print