정보보안기사/linux

리눅스 실습

멋쟁이천재사자 2023. 7. 20. 09:53

7월 20일 실습을 하려고 하였으나 Cent OS 환경 구성이 늦어저서 22일에 실습을 해보았다.

 

 

주요 명령어

find . -name "a*.txt"  -> " 로 안묶어 주면 오류가 난다. 언제는 에러가 나고 언제는 에러가 안나는 것인가

find . -name "a*.txt" -exec cp "{}" ./output/ \; --> output 경로가 . 경로 아래라 재귀적인 문제가 발생하는 듯

find /usr/bin -size +10k -size -100k | wc -l
lastlog

pstree -p     --> Process tree ? 미니멀버전의 centos 궁금하군
echo $$       --> 현재 세션의 PID
exec sleep 10 --> 창이 10초(?)후에 창이 사라져버림. 뭔가
ps -aef | grep $USER --> 사용자명이 u 로 너무 짧으니 너무 많이 나옴

nmtui --> GUI 화면이 뜬다? TAB 키를 활용하자

 

 

 

 

참고한 자료

 

https://www.baeldung.com/linux/exec-command-in-shell-script

 

The Uses of the Exec Command in Shell Script | Baeldung on Linux

The Bash built-in command 'exec' is a powerful tool. Let's find out what it can do for our scripts.

www.baeldung.com

 


exec가 궁금해서 찾아보았다. 크론 사용법 설명이 좋다. 따라해보자
https://syj927.tistory.com/4

 

LINUX내 시스템 설정

#1 해킹방지 - rkhunter 다운로드 : rookit을 잡아( hunter )주는 도구 -> rookit : 공격자가 root권한을 확보하기 위해 사용하는 해킹 툴 #wget http://172.20.30.142/data/rkhunter-1.4.6.tar.gz // 안되는 사람은 밑에 참조

syj927.tistory.com



제목과 설명이 직관적이다.

https://blog.naver.com/neutrinoant/223068692370

 

맘에 안드는 linux shell 명령어

명령어가 하는 일: "./images 폴더 내에서 000으로 시작하는 .jpg 파일을 다 찾아서 ./output/ 폴더로...

blog.naver.com

 

 

 

실습 세부 로그

 

[u@centos test]$ find . -name "a*.txt"
./a.txt
./ab.txt
[u@centos test]$ find . -name a*.txt
find: paths must precede expression: ab.txt
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

[u@centos test]$ ls
a.txt  ab.txt  b.txt  c.txt  output
[u@centos test]$ find . -name "a*.txt" -exec cp "{}" ./output/ \;
cp: `./output/a.txt' and `./output/a.txt' are the same file
cp: `./output/ab.txt' and `./output/ab.txt' are the same file

 

[u@centos test]$ find .
.
./src
./src/a.txt
./src/ab.txt
./src/b.txt
./src/c.txt
./dst
[u@centos test]$ find ./src -name "a*.txt" -exec cp "{}" ./dst/ \;
[u@centos test]$ find .
.
./src
./src/a.txt
./src/ab.txt
./src/b.txt
./src/c.txt
./dst
./dst/a.txt
./dst/ab.txt

 

[u@centos test]$ cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed

 

[u@centos ~]$ find /usr/bin -size +10k -size -100k | wc -l
1060


[u@centos ~]$ lastlog
사용자이름       포트     어디서           최근정보
root             pts/0                     금  7월 21 20:43:05 +0900 2023
bin                                        **한번도 로그인한 적이 없습니다**
daemon                                     **한번도 로그인한 적이 없습니다**
adm                                        **한번도 로그인한 적이 없습니다**
...
tcpdump                                    **한번도 로그인한 적이 없습니다**
u                pts/1    192.168.35.124   토  7월 22 13:01:19 +0900 2023
vboxadd                                    **한번도 로그인한 적이 없습니다**

 

[u@centos ~]$ pstree -p
systemd(1)─┬─ModemManager(698)─┬─{ModemManager}(743)
           │                   └─{ModemManager}(745)
           ├─NetworkManager(796)─┬─dhclient(931)
           │                     ├─{NetworkManager}(810)
           │                     └─{NetworkManager}(812)
           ├─abrt-watch-log(704)
           ├─abrt-watch-log(707)
           ├─abrtd(703)
           ├─accounts-daemon(702)─┬─{accounts-daemon}(717)
           │                      └─{accounts-daemon}(719)
           ├─alsactl(695)
           ├─at-spi-bus-laun(2380)─┬─dbus-daemon(2385)───{dbus-daemon}(2386)
           │                       ├─{at-spi-bus-laun}(2381)
           │                       ├─{at-spi-bus-laun}(2382)
           │                       └─{at-spi-bus-laun}(2384)
           ├─at-spi2-registr(2389)─┬─{at-spi2-registr}(2393)
           │                       └─{at-spi2-registr}(2394)
           ├─atd(1185)
           ├─auditd(632)─┬─audispd(634)─┬─sedispatch(636)
           │             │              └─{audispd}(637)
           │             └─{auditd}(633)
           ├─avahi-daemon(667)───avahi-daemon(673)
           ├─boltd(1990)─┬─{boltd}(1992)
           │             └─{boltd}(1994)
           ├─chronyd(736)
           ├─colord(2077)─┬─{colord}(2092)
           │              └─{colord}(2094)
           ├─crond(1194)
           ├─cupsd(1152)
           ├─dbus-daemon(668)───{dbus-daemon}(683)
           ├─dbus-daemon(2225)───{dbus-daemon}(2226)
           ├─dbus-launch(2224)
           ├─dconf-service(2808)─┬─{dconf-service}(2824)
           │                     └─{dconf-service}(2826)
           ├─dnsmasq(1807)───dnsmasq(1808)
           ├─evolution-addre(2835)─┬─evolution-addre(2908)─┬─{evolution-addre}(+
           │                       │                       ├─{evolution-addre}(+
           │                       │                       ├─{evolution-addre}(+
           │                       │                       ├─{evolution-addre}(+
           │                       │                       └─{evolution-addre}(+
           │                       ├─{evolution-addre}(2861)
           │                       ├─{evolution-addre}(2862)
           │                       ├─{evolution-addre}(2895)
           │                       └─{evolution-addre}(2896)
           ├─evolution-calen(2722)─┬─evolution-calen(2795)─┬─{evolution-calen}(+
           │                       │                       ├─{evolution-calen}(+
           │                       │                       ├─{evolution-calen}(+
           │                       │                       ├─{evolution-calen}(+
           │                       │                       ├─{evolution-calen}(+
           │                       │                       ├─{evolution-calen}(+
           │                       │                       ├─{evolution-calen}(+
           │                       │                       └─{evolution-calen}(+
           │                       ├─{evolution-calen}(2728)
           │                       ├─{evolution-calen}(2729)
           │                       ├─{evolution-calen}(2790)
           │                       └─{evolution-calen}(2791)
           ├─evolution-sourc(2499)─┬─{evolution-sourc}(2501)
           │                       ├─{evolution-sourc}(2502)
           │                       └─{evolution-sourc}(2503)
           ├─fwupd(3001)─┬─{fwupd}(3012)
           │             ├─{fwupd}(3013)
           │             ├─{fwupd}(3014)
           │             └─{fwupd}(3015)
           ├─gdm(1183)─┬─X(1337)─┬─{X}(1794)
           │           │         ├─{X}(1795)
           │           │         └─{X}(1858)
           │           ├─gdm-session-wor(2161)─┬─gnome-session-b(2215)─┬─abrt-a+
           │           │                       │                       ├─gnome-+
           │           │                       │                       ├─gnome-+
           │           │                       │                       ├─gnome-+
           │           │                       │                       ├─gsd-a1+
           │           │                       │                       ├─gsd-ac+
           │           │                       │                       ├─gsd-cl+
           │           │                       │                       ├─gsd-co+
           │           │                       │                       ├─gsd-da+
           │           │                       │                       ├─gsd-di+
           │           │                       │                       ├─gsd-ho+
           │           │                       │                       ├─gsd-ke+
           │           │                       │                       ├─gsd-me+
           │           │                       │                       ├─gsd-mo+
           │           │                       │                       ├─gsd-po+
           │           │                       │                       ├─gsd-pr+
           │           │                       │                       ├─gsd-rf+
           │           │                       │                       ├─gsd-sc+
           │           │                       │                       ├─gsd-sh+
           │           │                       │                       ├─gsd-sm+
           │           │                       │                       ├─gsd-so+
           │           │                       │                       ├─gsd-wa+
           │           │                       │                       ├─gsd-xs+
           │           │                       │                       ├─nautil+
           │           │                       │                       ├─seappl+
           │           │                       │                       ├─ssh-ag+
           │           │                       │                       ├─tracke+
           │           │                       │                       ├─tracke+
           │           │                       │                       ├─tracke+
           │           │                       │                       ├─tracke+
           │           │                       │                       ├─{gnome+
           │           │                       │                       ├─{gnome+
           │           │                       │                       └─{gnome+
           │           │                       ├─{gdm-session-wor}(2162)
           │           │                       └─{gdm-session-wor}(2163)
           │           ├─{gdm}(1330)
           │           ├─{gdm}(1331)
           │           └─{gdm}(1336)
           ├─geoclue(2487)─┬─{geoclue}(2489)
           │               └─{geoclue}(2491)
           ├─gnome-keyring-d(2173)─┬─{gnome-keyring-d}(2174)
           │                       ├─{gnome-keyring-d}(2175)
           │                       └─{gnome-keyring-d}(2414)
           ├─gnome-shell-cal(2483)─┬─{gnome-shell-cal}(2494)
           │                       ├─{gnome-shell-cal}(2497)
           │                       ├─{gnome-shell-cal}(2531)
           │                       ├─{gnome-shell-cal}(2532)
           │                       └─{gnome-shell-cal}(2711)
           ├─gnome-terminal-(3077)─┬─bash(3085)───su(3216)───bash(3225)
           │                       ├─gnome-pty-helpe(3084)
           │                       ├─{gnome-terminal-}(3078)
           │                       ├─{gnome-terminal-}(3079)
           │                       └─{gnome-terminal-}(3080)
           ├─goa-daemon(2510)─┬─{goa-daemon}(2575)
           │                  ├─{goa-daemon}(2577)
           │                  └─{goa-daemon}(2578)
           ├─goa-identity-se(2581)─┬─{goa-identity-se}(2584)
           │                       ├─{goa-identity-se}(2585)
           │                       └─{goa-identity-se}(2586)
           ├─gsd-printer(2682)─┬─{gsd-printer}(2688)
           │                   └─{gsd-printer}(2690)
           ├─gssproxy(676)─┬─{gssproxy}(678)
           │               ├─{gssproxy}(679)
           │               ├─{gssproxy}(680)
           │               ├─{gssproxy}(681)
           │               └─{gssproxy}(682)
           ├─gvfs-afc-volume(2515)─┬─{gvfs-afc-volume}(2519)
           │                       ├─{gvfs-afc-volume}(2520)
           │                       └─{gvfs-afc-volume}(2522)
           ├─gvfs-goa-volume(2559)─┬─{gvfs-goa-volume}(2571)
           │                       └─{gvfs-goa-volume}(2572)
           ├─gvfs-gphoto2-vo(2524)─┬─{gvfs-gphoto2-vo}(2535)
           │                       └─{gvfs-gphoto2-vo}(2537)
           ├─gvfs-mtp-volume(2540)─┬─{gvfs-mtp-volume}(2555)
           │                       └─{gvfs-mtp-volume}(2557)
           ├─gvfs-udisks2-vo(2507)─┬─{gvfs-udisks2-vo}(2511)
           │                       └─{gvfs-udisks2-vo}(2512)
           ├─gvfsd(2258)─┬─gvfsd-burn(2981)─┬─{gvfsd-burn}(2983)
           │             │                  └─{gvfsd-burn}(2984)
           │             ├─gvfsd-trash(2709)─┬─{gvfsd-trash}(2712)
           │             │                   └─{gvfsd-trash}(2713)
           │             ├─{gvfsd}(2259)
           │             └─{gvfsd}(2260)
           ├─gvfsd-fuse(2263)─┬─{gvfsd-fuse}(2270)
           │                  ├─{gvfsd-fuse}(2272)
           │                  ├─{gvfsd-fuse}(2273)
           │                  ├─{gvfsd-fuse}(2277)
           │                  └─{gvfsd-fuse}(2282)
           ├─ibus-portal(2469)─┬─{ibus-portal}(2472)
           │                   └─{ibus-portal}(2473)
           ├─ibus-x11(2466)─┬─{ibus-x11}(2470)
           │                └─{ibus-x11}(2471)
           ├─imsettings-daem(2254)─┬─{imsettings-daem}(2255)
           │                       ├─{imsettings-daem}(2256)
           │                       └─{imsettings-daem}(2265)
           ├─irqbalance(701)
           ├─ksmtuned(733)───sleep(14770)
           ├─libvirtd(1177)─┬─{libvirtd}(1320)
           │                ├─{libvirtd}(1321)
           │                ├─{libvirtd}(1322)
           │                ├─{libvirtd}(1323)
           │                ├─{libvirtd}(1324)
           │                ├─{libvirtd}(1325)
           │                ├─{libvirtd}(1326)
           │                ├─{libvirtd}(1327)
           │                ├─{libvirtd}(1328)
           │                ├─{libvirtd}(1329)
           │                ├─{libvirtd}(1744)
           │                ├─{libvirtd}(1745)
           │                ├─{libvirtd}(1746)
           │                ├─{libvirtd}(1747)
           │                ├─{libvirtd}(1748)
           │                └─{libvirtd}(1754)
           ├─lsmd(691)
           ├─lvmetad(516)
           ├─master(1401)─┬─pickup(14055)
           │              └─qmgr(1403)
           ├─mcelog(716)
           ├─mission-control(2505)─┬─{mission-control}(2516)
           │                       ├─{mission-control}(2518)
           │                       └─{mission-control}(2525)
           ├─packagekitd(1997)─┬─{packagekitd}(2015)
           │                   └─{packagekitd}(2016)
           ├─polkitd(657)─┬─{polkitd}(677)
           │              ├─{polkitd}(684)
           │              ├─{polkitd}(689)
           │              ├─{polkitd}(746)
           │              ├─{polkitd}(747)
           │              └─{polkitd}(751)
           ├─pulseaudio(2432)─┬─{pulseaudio}(2435)
           │                  └─{pulseaudio}(2438)
           ├─rngd(696)
           ├─rpcbind(661)
           ├─rsyslogd(1159)─┬─{rsyslogd}(1207)
           │                └─{rsyslogd}(1225)
           ├─rtkit-daemon(660)─┬─{rtkit-daemon}(685)
           │                   └─{rtkit-daemon}(686)
           ├─smartd(666)
           ├─sshd(1151)───sshd(3383)───sshd(3387)───bash(3396)───pstree(14772)
           ├─systemd-journal(487)
           ├─systemd-logind(688)
           ├─systemd-udevd(528)
           ├─tracker-store(2880)─┬─{tracker-store}(2893)
           │                     ├─{tracker-store}(2894)
           │                     ├─{tracker-store}(2897)
           │                     ├─{tracker-store}(2898)
           │                     ├─{tracker-store}(2899)
           │                     ├─{tracker-store}(2900)
           │                     └─{tracker-store}(2901)
           ├─tuned(1160)─┬─{tuned}(1739)
           │             ├─{tuned}(1740)
           │             ├─{tuned}(1742)
           │             └─{tuned}(1743)
           ├─udisksd(664)─┬─{udisksd}(674)
           │              ├─{udisksd}(687)
           │              ├─{udisksd}(761)
           │              └─{udisksd}(790)
           ├─upowerd(1924)─┬─{upowerd}(1925)
           │               └─{upowerd}(1926)
           ├─wpa_supplicant(2000)
           └─xdg-permission-(2478)─┬─{xdg-permission-}(2479)
                                   └─{xdg-permission-}(2481)
[u@centos ~]$

 

[u@centos ~]$ echo $$
15127
[u@centos ~]$ ps -aef | grep $USER
root         1     0  0  7월21 ?      00:00:07 /usr/lib/systemd/systemd --switched-root --system --deserialize 22
root         8     2  0  7월21 ?      00:00:00 [rcu_bh]
root         9     2  0  7월21 ?      00:00:19 [rcu_sched]
root        10     2  0  7월21 ?      00:00:00 [lru-add-drain]
root        21     2  0  7월21 ?      00:00:00 [khungtaskd]
root        38     2  0  7월21 ?      00:00:00 [khugepaged]
root        50     2  0  7월21 ?      00:00:00 [kaluad]
root        51     2  0  7월21 ?      00:00:00 [kpsmoused]
root       102     2  0  7월21 ?      00:00:00 [kauditd]
root       367     2  0  7월21 ?      00:00:00 [kdmflush]
root       378     2  0  7월21 ?      00:00:00 [kdmflush]
root       394     2  0  7월21 ?      00:00:00 [xfs_mru_cache]
root       395     2  0  7월21 ?      00:00:00 [xfs-buf/dm-0]
root       487     1  0  7월21 ?      00:00:07 /usr/lib/systemd/systemd-journald
root       516     1  0  7월21 ?      00:00:00 /usr/sbin/lvmetad -f
root       528     1  0  7월21 ?      00:00:00 /usr/lib/systemd/systemd-udevd
root       583     2  0  7월21 ?      00:00:00 [xfs-buf/sda1]
root       632     1  0  7월21 ?      00:00:00 /sbin/auditd
root       634   632  0  7월21 ?      00:00:00 /sbin/audispd
root       636   634  0  7월21 ?      00:00:00 /usr/sbin/sedispatch
polkitd    657     1  0  7월21 ?      00:00:07 /usr/lib/polkit-1/polkitd --no-debug
rtkit      660     1  0  7월21 ?      00:00:04 /usr/libexec/rtkit-daemon
root       664     1  0  7월21 ?      00:00:00 /usr/libexec/udisks2/udisksd
root       666     1  0  7월21 ?      00:00:00 /usr/sbin/smartd -n -q never
avahi      667     1  0  7월21 ?      00:00:10 avahi-daemon: running [centos.local]
dbus       668     1  0  7월21 ?      00:00:05 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root       676     1  0  7월21 ?      00:00:00 /usr/sbin/gssproxy -D
root       688     1  0  7월21 ?      00:00:01 /usr/lib/systemd/systemd-logind
libstor+   691     1  0  7월21 ?      00:00:00 /usr/bin/lsmd -d
root       695     1  0  7월21 ?      00:00:00 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/init/00main rdaemon
root       698     1  0  7월21 ?      00:00:00 /usr/sbin/ModemManager
root       701     1  0  7월21 ?      00:00:09 /usr/sbin/irqbalance --foreground
root       702     1  0  7월21 ?      00:00:01 /usr/libexec/accounts-daemon
root       703     1  0  7월21 ?      00:00:00 /usr/sbin/abrtd -d -s
root       704     1  0  7월21 ?      00:00:01 /usr/bin/abrt-watch-log -F BUG: WARNING: at WARNING: CPU: INFO: possible recursive locking detected ernel BUG at list_del corruption list_add corruption do_IRQ: stack overflow: ear stack overflow (cur: eneral protection fault nable to handle kernel ouble fault: RTNL: assertion failed eek! page_mapcount(page) went negative! adness at NETDEV WATCHDOG ysctl table check failed : nobody cared IRQ handler type mismatch Kernel panic - not syncing: Machine Check Exception: Machine check events logged divide error: bounds: coprocessor segment overrun: invalid TSS: segment not present: invalid opcode: alignment check: stack segment: fpu exception: simd exception: iret exception: /var/log/messages -- /usr/bin/abrt-dump-oops -xtD
root       707     1  0  7월21 ?      00:00:00 /usr/bin/abrt-watch-log -F Backtrace /var/log/Xorg.0.log -- /usr/bin/abrt-dump-xorg -xD
root       716     1  0  7월21 ?      00:00:00 /usr/sbin/mcelog --ignorenodev --daemon --syslog
root       733     1  0  7월21 ?      00:00:03 /bin/bash /usr/sbin/ksmtuned
chrony     736     1  0  7월21 ?      00:00:04 /usr/sbin/chronyd
root       796     1  0  7월21 ?      00:00:02 /usr/sbin/NetworkManager --no-daemon
root       931   796  0  7월21 ?      00:00:02 /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-enp0s8.pid -lf /var/lib/NetworkManager/dhclient-c70ae368-bb1f-3991-a37c-6182912bda41-enp0s8.lease -cf /var/lib/NetworkManager/dhclient-enp0s8.conf enp0s8
root      1151     1  0  7월21 ?      00:00:00 /usr/sbin/sshd -D
root      1152     1  0  7월21 ?      00:00:00 /usr/sbin/cupsd -f
root      1159     1  0  7월21 ?      00:00:15 /usr/sbin/rsyslogd -n
root      1160     1  0  7월21 ?      00:00:22 /usr/bin/python2 -Es /usr/sbin/tuned -l -P
root      1177     1  0  7월21 ?      00:00:00 /usr/sbin/libvirtd
root      1183     1  0  7월21 ?      00:00:00 /usr/sbin/gdm
root      1185     1  0  7월21 ?      00:00:00 /usr/sbin/atd -f
root      1194     1  0  7월21 ?      00:00:01 /usr/sbin/crond -n
root      1337  1183  0  7월21 tty1   00:00:10 /usr/bin/X :0 -background none -noreset -audit 4 -verbose -auth /run/gdm/auth-for-gdm-HWkSz5/database -seat seat0 -nolisten tcp vt1
root      1401     1  0  7월21 ?      00:00:01 /usr/libexec/postfix/master -w
postfix   1403  1401  0  7월21 ?      00:00:00 qmgr -l -t unix -u
nobody    1807     1  0  7월21 ?      00:00:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
root      1808  1807  0  7월21 ?      00:00:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/libexec/libvirt_leaseshelper
root      1924     1  0  7월21 ?      00:00:02 /usr/libexec/upowerd
root      1990     1  0  7월21 ?      00:00:00 /usr/libexec/boltd
root      1997     1  0  7월21 ?      00:00:03 /usr/libexec/packagekitd
root      2000     1  0  7월21 ?      00:00:01 /usr/sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log -c /etc/wpa_supplicant/wpa_supplicant.conf -P /var/run/wpa_supplicant.pid
colord    2077     1  0  7월21 ?      00:00:00 /usr/libexec/colord
u         2173     1  0  7월21 ?      00:00:00 /usr/bin/gnome-keyring-daemon --daemonize --login
u         2215  2161  0  7월21 ?      00:00:00 /usr/libexec/gnome-session-binary --session gnome-classic
u         2224     1  0  7월21 ?      00:00:00 dbus-launch --sh-syntax --exit-with-session
u         2225     1  0  7월21 ?      00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
u         2254     1  0  7월21 ?      00:00:00 /usr/libexec/imsettings-daemon
u         2258     1  0  7월21 ?      00:00:00 /usr/libexec/gvfsd
u         2263     1  0  7월21 ?      00:00:00 /usr/libexec/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
u         2362  2215  0  7월21 ?      00:00:01 /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "env GNOME_SHELL_SESSION_MODE=classic gnome-session --session gnome-classic"
u         2380     1  0  7월21 ?      00:00:00 /usr/libexec/at-spi-bus-launcher
u         2385  2380  0  7월21 ?      00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
u         2389     1  0  7월21 ?      00:00:00 /usr/libexec/at-spi2-registryd --use-gnome-session
u         2420  2215  0  7월21 ?      00:01:26 /usr/bin/gnome-shell
u         2432     1  0  7월21 ?      00:00:00 /usr/bin/pulseaudio --start --log-target=syslog
u         2458  2420  0  7월21 ?      00:00:04 ibus-daemon --xim --panel disable
u         2462  2458  0  7월21 ?      00:00:00 /usr/libexec/ibus-dconf
u         2466     1  0  7월21 ?      00:00:00 /usr/libexec/ibus-x11 --kill-daemon
u         2469     1  0  7월21 ?      00:00:00 /usr/libexec/ibus-portal
u         2478     1  0  7월21 ?      00:00:00 /usr/libexec/xdg-permission-store
u         2483     1  0  7월21 ?      00:00:00 /usr/libexec/gnome-shell-calendar-server
geoclue   2487     1  0  7월21 ?      00:00:00 /usr/libexec/geoclue -t 5
u         2499     1  0  7월21 ?      00:00:00 /usr/libexec/evolution-source-registry
u         2505     1  0  7월21 ?      00:00:00 /usr/libexec/mission-control-5
u         2507     1  0  7월21 ?      00:00:00 /usr/libexec/gvfs-udisks2-volume-monitor
u         2510     1  0  7월21 ?      00:00:00 /usr/libexec/goa-daemon
u         2515     1  0  7월21 ?      00:00:00 /usr/libexec/gvfs-afc-volume-monitor
u         2524     1  0  7월21 ?      00:00:00 /usr/libexec/gvfs-gphoto2-volume-monitor
u         2540     1  0  7월21 ?      00:00:00 /usr/libexec/gvfs-mtp-volume-monitor
u         2559     1  0  7월21 ?      00:00:00 /usr/libexec/gvfs-goa-volume-monitor
u         2581     1  0  7월21 ?      00:00:08 /usr/libexec/goa-identity-service
u         2590  2215  0  7월21 ?      00:00:01 /usr/libexec/gsd-power
u         2591  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-print-notifications
u         2595  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-rfkill
u         2602  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-screensaver-proxy
u         2606  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-sharing
u         2607  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-sound
u         2612  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-xsettings
u         2614  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-wacom
u         2616  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-smartcard
u         2618  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-account
u         2632  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-a11y-settings
u         2633  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-clipboard
u         2636  2215  0  7월21 ?      00:00:23 /usr/libexec/gsd-color
u         2637  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-datetime
u         2638  2215  0  7월21 ?      00:00:03 /usr/libexec/gsd-housekeeping
u         2642  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-keyboard
u         2644  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-media-keys
u         2648  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-mouse
u         2682     1  0  7월21 ?      00:00:00 /usr/libexec/gsd-printer
u         2695  2215  0  7월21 ?      00:00:00 nautilus-desktop --force
u         2709  2258  0  7월21 ?      00:00:00 /usr/libexec/gvfsd-trash --spawner :1.4 /org/gtk/gvfs/exec_spaw/0
u         2722     1  0  7월21 ?      00:00:00 /usr/libexec/evolution-calendar-factory
u         2735  2215  0  7월21 ?      00:00:00 /usr/libexec/gsd-disk-utility-notify
u         2741  2215  0  7월21 ?      00:00:00 /usr/bin/seapplet
u         2750  2215  0  7월21 ?      00:00:00 abrt-applet
u         2756  2215  0  7월21 ?      00:00:10 /usr/libexec/gnome-initial-setup --existing-user
u         2775  2215  0  7월21 ?      00:00:09 /usr/bin/gnome-software --gapplication-service
u         2776  2458  0  7월21 ?      00:00:00 /usr/libexec/ibus-engine-simple
u         2795  2722  0  7월21 ?      00:00:00 /usr/libexec/evolution-calendar-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.Calendarx2722x2 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/Calendar/2722/2
u         2808     1  0  7월21 ?      00:00:00 /usr/libexec/dconf-service
u         2819  2215  0  7월21 ?      00:00:00 /usr/libexec/tracker-extract
u         2834  2215  0  7월21 ?      00:00:00 /usr/libexec/tracker-miner-apps
u         2835     1  0  7월21 ?      00:00:00 /usr/libexec/evolution-addressbook-factory
u         2868  2215  0  7월21 ?      00:00:00 /usr/libexec/tracker-miner-fs
u         2874  2215  0  7월21 ?      00:00:00 /usr/libexec/tracker-miner-user-guides
u         2880     1  0  7월21 ?      00:00:00 /usr/libexec/tracker-store
u         2908  2835  0  7월21 ?      00:00:00 /usr/libexec/evolution-addressbook-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.AddressBookx2835x2 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/AddressBook/2835/2
u         2981  2258  0  7월21 ?      00:00:00 /usr/libexec/gvfsd-burn --spawner :1.4 /org/gtk/gvfs/exec_spaw/1
root      3001     1  0  7월21 ?      00:00:06 /usr/libexec/fwupd/fwupd
u         3077     1  0  7월21 ?      00:00:02 /usr/libexec/gnome-terminal-server
u         3084  3077  0  7월21 ?      00:00:00 gnome-pty-helper
u         3085  3077  0  7월21 pts/0  00:00:00 bash
root      3216  3085  0  7월21 pts/0  00:00:00 su - root
postfix  14055  1401  0 11:40 ?        00:00:00 pickup -l -t unix -u
root     14258     2  0 12:00 ?        00:00:00 [kworker/u4:0]
root     14402     2  0 12:10 ?        00:00:00 [kworker/u4:2]
root     15073  1151  0 13:00 ?        00:00:00 sshd: u [priv]
root     15108     2  0 13:01 ?        00:00:00 [kworker/u4:1]
u        15118 15073  0 13:01 ?        00:00:00 sshd: u@pts/1
u        15127 15118  0 13:01 pts/1    00:00:00 -bash
root     15149     1  0 13:01 ?        00:00:00 /usr/sbin/abrt-dbus -t133
u        15170 15127  0 13:01 pts/1    00:00:00 ps -aef
u        15171 15127  0 13:01 pts/1    00:00:00 grep --color=auto u

 

[u@centos ~]$ find src -name "*.java" -type f -exec grep -l interface {} \;
find: ‘src’: 그런 파일이나 디렉터리가 없습니다
[u@centos ~]$ find / -name "*.java" -type f -exec grep -l interface {} \;
find: ‘/boot/efi’: 허가 거부
find: ‘/boot/grub2’: 허가 거부
find: ‘/proc/tty/driver’: 허가 거부
find: ‘/proc/1/task/1/fd’: 허가 거부
find: ‘/proc/1/task/1/fdinfo’: 허가 거부

...

find: ‘/usr/lib64/Pegasus’: 허가 거부
find: ‘/usr/share/polkit-1/rules.d’: 허가 거부
find: ‘/usr/share/Pegasus/scripts’: 허가 거부
find: ‘/usr/libexec/initscripts/legacy-actions/auditd’: 허가 거부

 

'정보보안기사 > linux' 카테고리의 다른 글

CentOS 7 설치 #4  (0) 2023.07.21
CentOS 7 설치 #3  (0) 2023.07.20
CentOS 7 설치 #2  (0) 2023.07.19
CentOS 7 설치 #1  (0) 2023.07.19
세컨드 리눅스 구성  (0) 2023.07.19