BaiTH05 Bài tBài tậpp In 1 %%bash cd root cd var cd local pwd cd pwd cd usrbin pwd cd pwd cd pwd touch vidub2004746 ls l vidub2004746 cat etcpasswd | more cat etcgroup ls bin > file1 ls bi.
Bài tập In [1]: %%bash cd /root cd /var cd local pwd cd pwd cd /usr/bin pwd cd pwd cd pwd touch vidub2004746 ls -l vidub2004746 cat /etc/passwd | more cat /etc/group ls /bin > file1 ls /bin >> file1 echo "Hello World!" echo "Hello World" > helloword.txt ls -l helloword.txt /var/local /var /usr/bin /usr /root -rw-r r root root May 14:24 vidub2004746 root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/usr/sbin/nologin man:x:6:12:man:/var/cache/man:/usr/sbin/nologin lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin mail:x:8:8:mail:/var/mail:/usr/sbin/nologin news:x:9:9:news:/var/spool/news:/usr/sbin/nologin uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin proxy:x:13:13:proxy:/bin:/usr/sbin/nologin www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin backup:x:34:34:backup:/var/backups:/usr/sbin/nologin list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin _apt:x:100:65534::/nonexistent:/usr/sbin/nologin systemd-network:x:101:104:systemd Network Management,,,:/run/systemd/netif:/usr/sbin/nolo gin systemd-resolve:x:102:105:systemd Resolver,,,:/run/systemd/resolve:/usr/sbin/nologin messagebus:x:103:107::/nonexistent:/usr/sbin/nologin nvidia-persistenced:x:104:108:NVIDIA Persistence Daemon,,,:/nonexistent:/usr/sbin/nologin root:x:0: daemon:x:1: bin:x:2: sys:x:3: adm:x:4: tty:x:5: disk:x:6: lp:x:7: mail:x:8: news:x:9: uucp:x:10: uucp:x:10: man:x:12: proxy:x:13: kmem:x:15: dialout:x:20: fax:x:21: voice:x:22: cdrom:x:24: floppy:x:25: tape:x:26: sudo:x:27: audio:x:29: dip:x:30: www-data:x:33: backup:x:34: operator:x:37: list:x:38: irc:x:39: src:x:40: gnats:x:41: shadow:x:42: utmp:x:43: video:x:44: sasl:x:45: plugdev:x:46: staff:x:50: games:x:60: users:x:100: nogroup:x:65534: ssh:x:101: rdma:x:102: systemd-journal:x:103: systemd-network:x:104: systemd-resolve:x:105: input:x:106: messagebus:x:107: nvidia-persistenced:x:108: Hello World! -rw-r r root root 12 May 14:24 helloword.txt In [2]: !bash bash: cannot set terminal process group (58): Inappropriate ioctl for device bash: no job control in this shell /content# cat > vuphuong phuong > OK /content# cat vuphuong vu phuong /content# exit exit In [3]: %%bash ls -l | wc -l ps -ef | tee file_process | grep root root 0 14:23 ? 00:00:00 /sbin/docker-init /datalab/run.sh root 14:23 ? 00:00:00 /tools/node/bin/node /datalab/web/ap p.js root 18 0 14:23 ? 00:00:00 tail -n +0 -F /root/.config/Google/D riveFS/Logs/dpb.txt /root/.config/Google/DriveFS/Logs/drive_fs.txt root 29 14:24 ? 00:00:06 [python3] root 30 14:24 ? 00:00:00 python3 /usr/local/bin/colab-fileshi m.py root 43 14:24 ? 00:00:01 /usr/bin/python3 /usr/local/bin/jupy ter-notebook ip="172.28.0.2" port=9000 FileContentsManager.root_dir="/" MappingKe ter-notebook ip="172.28.0.2" port=9000 FileContentsManager.root_dir="/" MappingKe rnelManager.root_dir="/content" root 44 14:24 ? 00:00:00 /usr/local/bin/dap_multiplexer dom ain_socket_path=/tmp/debugger_299nkik1v2 root 58 43 14:24 ? 00:00:03 /usr/bin/python3 -m ipykernel_launch er -f /root/.local/share/jupyter/runtime/kernel-27147c8d-50ac-471b-b4e8-6477fb597537.json root 81 14:24 ? 00:00:00 /usr/bin/python3 /usr/local/lib/pyth on3.7/dist-packages/debugpy/adapter for-server 39261 host 127.0.0.1 port 19021 se rver-access-token 33ecdfb2648812a46f77f0d2b41bbe67faeedc1bf2b728076626f83ed565502f root 98 14:24 ? 00:00:02 node /datalab/web/pyright/pyright-la ngserver.js stdio cancellationReceive=file:9b13cad50a04cc9bdfd9098488ecf7bac3da39993b root 158 58 14:28 ? 00:00:00 bash root 161 158 14:28 ? 00:00:00 ps -ef root 162 158 14:28 ? 00:00:00 tee file_process root 163 158 14:28 ? 00:00:00 grep root Bài tập In [4]: %%bash cd pwd ls -l -d /root /root drwx root root 4096 May 14:28 /root Thư mục mục home người dùng làm việc là: /root Trong đó: d: Cho biết thư mục rwx: Chủ sở hữu root có quyền: Đọc, ghi, thực thi -: Nhóm sở hữu root khơng có quyền -: Người dùng khác khơng có quyền 1: Số liên kết đến thư mục root: Chủ sở hữu thư mục /root root root: Nhóm sở hữu thư mục /root root 4096: Kích thước thư mục Apr 05:48 : Thời gian thư mục sửa đổi sau /root: Tên thư mục root Bài tập In [5]: %%bash ls -l / total 96 drwxr-xr-x root root 4096 drwxr-xr-x root root 4096 drwxr-xr-x root root 4096 drwxr-xr-x root root 4096 drwxr-xr-x root root 360 drwxr-xr-x root root 4096 drwxr-xr-x root root 4096 drwxr-xr-x root root 4096 drwxr-xr-x root root 4096 drwxr-xr-x root root 4096 drwxr-xr-x root root 4096 drwxr-xr-x root root 4096 drwxr-xr-x root root 4096 dr-xr-xr-x 172 root root drwxr-xr-x 14 root root 4096 drwx -1 root root 4096 drwxr-xr-x root root 4096 Apr Apr May Apr May May Apr Apr Apr Apr Nov Nov Apr May Apr May Apr 29 24 29 1 24 29 29 29 19 19 29 29 29 03:10 2018 14:28 03:34 14:23 14:23 2018 03:11 02:58 02:57 2020 2020 03:13 14:23 03:12 14:28 03:01 bin boot content datalab dev etc home lib lib32 lib64 media mnt opt proc python-apt root run drwxr-xr-x drwxr-xr-x drwxr-xr-x dr-xr-xr-x drwxr-xr-x drwxrwxrwt drwxr-xr-x drwxr-xr-x drwxr-xr-x 1 13 1 1 root root root root root root root root root root root root root root root root root root 4096 4096 4096 4096 4096 4096 4096 4096 Apr May Nov May Apr May Apr Apr May 29 19 29 29 29 03:01 14:23 2020 14:23 03:32 14:27 03:34 03:13 14:23 run sbin srv sys tensorflow-1.15.2 tmp tools usr var Thư mục /bin: Nội dung: Chứa tập tin nhị phân (chương trình) cần cho việc khởi động hệ thống làm việc chế độ người dùng đơn để trì hệ thống Quyền: rwxr-xr-x Thư mục /boot: Nội dung: Chứa kernel image tập tin cấu hình khởi động Quyền: rwxr-xr-x Thư mục /dev: Nội dung: Chứa tập tin đặc biệt sử dụng để tương tác với thiết bị phần cứng Quyền: rwxr-xr-x Thư mục /etc: Nội dung: Chứa tập tin cấu hình hệ thống Quyền: rwxr-xr-x Thư mục /home: Nội dung: Chứa thư mục home người dùng Quyền:rwxr-xr-x Thư mục /lib: Nội dung: Chứa module thư viện dùng câu lệnh Quyền: rwxr-xr-x Thư mục /mnt: Nội dung: Chứa thư mục trỏ đến thiết bị lưu trữ Quyền: rwxr-xr-x Thư mục /proc: Nội dung: Một hệ thống tập tin giả lập cho việc chuyển đổi liệu tiến trình Quyền: r-xr-xr-x Thư mục sbin: Nội dung: Chứa câu lệnh cần thiết cho việc quản trị hệ thống Quyền: rwxr-xr-x Thư mục /tmp: Nội dung: Chứa tập tin tạm thời (temporary files) Quyền: rwxrwxrwt Thư mục /usr: Nội dung: Chứa tập tin chương trình, thư viện, tài liệu,… dùng người dùng (normal users) Quyền: rwxr-xr-x Thư mục /var: Nội dung: Chứa tập tin liệu thường xuyên thay đổi như: tập tin log hệ thống, mail tập tin Nội dung: Chứa tập tin liệu thường xuyên thay đổi như: tập tin log hệ thống, mail tập tin ghi nhận in ấn… Quyền: rwxr-xr-x Bài tập drwxr-xr abc users 1024 Mar 12:35 ddd Giải thích: d: Cho biết thư mục rwx: Chủ sở hữu có quyền: Đọc, ghi, thực thi r-x: Nhóm sở hữu có quyền: Đọc, thực thi, khơng có quyền ghi r : Người dùng khác có quyền: Đọc, khơng có quyền ghi thực thi 2: Số liên kết đến thư mục abc: Chủ sở hữu thư mục ddd abc users: Nhóm sở hữu thư mục ddd users 1024: Kích thước thư mục Mar 12:35 : Thời gian thư mục sửa đổi sau ddd: Tên thư mục ddd Bài Trong hệ thống tập tin linux, thư mục chứa tập tin cấu hình hệ thống thư mục: /etc Bài Hai thư mục hệ thống tập tin linux có chứa tập tin thư viện lệnh: lib lib32 Bài Thư mục /: Là thư mục gốc(root) chứa tất thư mục khác chứa thư mục /root Thư mục /root: Là thư mục home root user Bài tập In [6]: %%bash pwd cd ~ pwd cd pwd cd pwd cd root pwd /content /root /root / /root Bài tập In [7]: %%bash cd /var/spool pwd cd mail pwd cd / /spool/mail pwd /var/spool /var/spool/mail /var/spool/mail Bài tập In [8]: %%bash apt install tree Reading package lists Building dependency tree Reading state information The following packages were automatically installed and are no longer required: libnvidia-common-460 nsight-compute-2020.2.0 Use 'apt autoremove' to remove them The following NEW packages will be installed: tree upgraded, newly installed, to remove and 42 not upgraded Need to get 40.7 kB of archives After this operation, 105 kB of additional disk space will be used Get:1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 tree amd64 1.7.0-5 [40.7 kB] Fetched 40.7 kB in 1s (48.1 kB/s) Selecting previously unselected package tree (Reading database 155202 files and directories currently installed.) Preparing to unpack /tree_1.7.0-5_amd64.deb Unpacking tree (1.7.0-5) Setting up tree (1.7.0-5) Processing triggers for man-db (2.8.3-2ubuntu0.1) WARNING: apt does not have a stable CLI interface Use with caution in scripts In [9]: %%bash cd /var tree -d | tail -1 155 directories In [10]: %%bash cd /var ls /sbin ls -l -d /sbin agetty badblocks blkdiscard blkid blockdev cfdisk chcpu ctrlaltdel debugfs depmod docker-init dumpe2fs e2fsck e2image e2label e2undo fdisk findfs fsck fsck.cramfs fsck.ext2 fsck.ext3 fsck.ext4 fsck.minix fsfreeze fstab-decode fstrim getty halt hwclock init initctl insmod installkernel isosize killall5 ldconfig ldconfig.real logsave losetup lsmod mke2fs mkfs mkfs.bfs mkfs.cramfs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.minix mkhomedir_helper mkswap modinfo modprobe mount.fuse pam_extrausers_chkpwd pam_extrausers_update pam_tally pam_tally2 pivot_root poweroff raw reboot resize2fs rmmod runlevel runuser sfdisk shadowconfig shutdown start-stop-daemon sulogin swaplabel swapoff swapon switch_root sysctl telinit tune2fs ub-device-create udevadm unix_chkpwd unix_update wipefs zramctl drwxr-xr-x root root 4096 May 14:23 /sbin Hiển thị nội dung thư mục /sbin, khơng có thơng báo lỗi Vì theo phân quyền thư mục /sbin tất người dùng có quyền đọc(read) thư mục /sbin In [11]: %%bash cd /var mkdir userxxx In [12]: %%bash ls -l -d /var drwxr-xr-x root root 4096 May 14:32 /var Khơng có thơng báo hiển thị Vì người dùng root mà chủ sở hữu thư mục /var root có quyền ghi(write) vào thư mục /var In [13]: %%bash cd /var cd mkdir vuphuong In [14]: %%bash ls -l -d /root drwx root root 4096 May 14:33 /root Khơng có thơng báo hiển thị Vì người dùng root Mà theo quyền thư mục /root chủ hữu thư mục người dùng root có tồn quyền thư mục /root In [15]: %%bash cd /var cd cd vuphuong pwd echo '"This is a message"' > fffff /root/vuphuong Kết quả: Tập tin fffff tạo thành công In [16]: %%bash cd /var cd ~/vuphuong pwd rmdir ~/vuphuong /root/vuphuong rmdir: failed to remove '/root/vuphuong': Directory not empty Thông báo lỗi hiển thị: rmdir: failed to remove '/root/vuphuong': Directory not empty Tại lệnh rmdir xóa thư mục rỗng, thư mục vuphuong có chứa file fffff nên từ ta khơng thể xóa Bài tập 10 Liệt kê tất tập tin thư mục home người dùng làm việc: In [17]: %%bash cd ls -l -a total 76 drwx -drwxr-xr-x -rw -r-xr-xr-x drwxr-xr-x drwxr-xr-x -rw-r r-drwxr-xr-x -rw-r r-drwxr-xr-x drwx -drwxr-xr-x drwxr-xr-x drwxr-xr-x -rw-r r r-xr-xr-x -rw-r r-drwxr-xr-x 1 1 1 2 1 Các tập tin ẩn: bashrc cache config gsutil ipython jupyter keras local root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root root 4096 4096 52 1169 4096 4096 1694 4096 12 4096 4096 4096 4096 4096 148 254 4096 May May May Jan Apr Apr May Apr May Apr Apr May Apr Apr Aug Jan May May 1 1 29 29 29 29 29 29 29 17 1 14:33 14:23 14:28 2000 03:35 03:34 14:24 03:19 14:24 03:34 03:34 14:24 03:34 03:34 2015 2000 14:24 14:33 .bash_history bashrc cache config file1 gsutil helloword.txt ipython jupyter keras local npm profile tmux.conf vidub2004746 vuphuong .npm profile tmux.conf Bài tập 11 In [18]: %%bash tail -4 /etc/passwd systemd-network:x:101:104:systemd Network Management,,,:/run/systemd/netif:/usr/sbin/nolo gin systemd-resolve:x:102:105:systemd Resolver,,,:/run/systemd/resolve:/usr/sbin/nologin messagebus:x:103:107::/nonexistent:/usr/sbin/nologin nvidia-persistenced:x:104:108:NVIDIA Persistence Daemon,,,:/nonexistent:/usr/sbin/nologin In [19]: %%bash tail -6 /etc/group systemd-journal:x:103: systemd-network:x:104: systemd-resolve:x:105: input:x:106: messagebus:x:107: nvidia-persistenced:x:108: In [20]: %%bash tail -8 /etc/login.defs # # # # CLOSE_SESSIONS LOGIN_STRING NO_PASSWORD_CONSOLE QMAIL_DIR In [21]: %%bash tail -20 /etc/login.defs #CHFN_AUTH #CHSH_AUTH #FAIL_DELAY ################# OBSOLETED ####################### # # # These options are no more handled by shadow # # # # Shadow utilities will display a warning if they # # still appear # # # /sys/devices/virtual/block/loop6/slaves /sys/devices/virtual/block/loop4/holders /sys/devices/virtual/block/loop4/mq/0/cpu1 /sys/devices/virtual/block/loop4/mq/0/cpu0 /sys/devices/virtual/block/loop4/slaves /sys/devices/virtual/block/md0/holders /sys/devices/virtual/block/md0/slaves /sys/devices/virtual/block/loop2/holders /sys/devices/virtual/block/loop2/mq/0/cpu1 /sys/devices/virtual/block/loop2/mq/0/cpu0 /sys/devices/virtual/block/loop2/slaves /sys/devices/virtual/block/loop0/holders /sys/devices/virtual/block/loop0/mq/0/cpu1 /sys/devices/virtual/block/loop0/mq/0/cpu0 /sys/devices/virtual/block/loop0/slaves /sys/devices/virtual/block/dm-0/holders /sys/devices/virtual/block/loop7/holders /sys/devices/virtual/block/loop7/mq/0/cpu1 /sys/devices/virtual/block/loop7/mq/0/cpu0 /sys/devices/virtual/block/loop7/slaves /sys/devices/virtual/block/loop5/holders /sys/devices/virtual/block/loop5/mq/0/cpu1 /sys/devices/virtual/block/loop5/mq/0/cpu0 /sys/devices/virtual/block/loop5/slaves /sys/devices/virtual/block/loop3/holders /sys/devices/virtual/block/loop3/mq/0/cpu1 /sys/devices/virtual/block/loop3/mq/0/cpu0 /sys/devices/virtual/block/loop3/slaves /sys/hypervisor /sys/fs/9p /sys/fs/pstore /sys/fs/bpf /sys/bus/xen/devices /sys/bus/xen/drivers /sys/bus/pci/slots /sys/bus/xen-backend/devices /sys/bus/xen-backend/drivers /sys/bus/dax/devices /sys/bus/dax/drivers /sys/bus/mdio_bus/devices /sys/bus/pci_express/devices /sys/bus/container/devices /sys/bus/container/drivers /sys/bus/clockevents/drivers /sys/bus/event_source/drivers /sys/bus/nvmem/drivers /sys/bus/clocksource/drivers /sys/bus/node/drivers /sys/bus/workqueue/drivers /sys/firmware /sys/module/loadpin_trigger/holders /sys/module/virtio_balloon/holders /sys/module/sch_htb/holders /sys/module/cls_u32/holders /sys/module/xt_state/holders /sys/module/br_netfilter/holders /sys/module/veth/holders /sys/module/xt_addrtype/holders /sys/module/xt_nat/holders /sys/module/aesni_intel/holders /sys/module/iptable_nat/holders /sys/module/xt_MASQUERADE/holders /proc/fs/nfsd /proc/irq/1/i8042 /proc/irq/4/ttyS0 /proc/irq/8/rtc0 /proc/irq/9/acpi /proc/irq/12/i8042 /proc/irq/24/virtio3-config /proc/irq/25/virtio3-input /proc/irq/26/virtio0-config /proc/irq/27/virtio0-control /proc/irq/28/virtio0-event /proc/irq/28/virtio0-event /proc/irq/29/virtio0-request /proc/irq/30/virtio1-config /proc/irq/31/virtio1-input.0 /proc/irq/32/virtio1-output.0 /proc/irq/33/virtio1-input.1 /proc/irq/34/virtio1-output.1 /proc/irq/35/virtio2-config /proc/irq/36/virtio2-inflate /proc/irq/37/virtio2-deflate /proc/irq/38/virtio2-stats /proc/sys/fs/binfmt_misc /proc/tty/ldisc /proc/acpi /proc/scsi /proc/29/task/29/fd /proc/29/task/29/fdinfo /proc/29/fd /proc/29/map_files /proc/29/fdinfo /tmp/pyright-98-6cgBTblL49yN /tmp/pyright-98-POKeQwuqAXob /tmp/python-languageserver-cancellation/9b13cad50a04cc9bdfd9098488ecf7bac3da39993b /usr/share/misc /usr/share/terminfo /usr/share/man/cs/man5 /usr/share/man/cs/man1 /usr/share/man/cs/man8 /usr/share/man/hu/man1 /usr/share/man/ko/man1 /usr/share/man/zh_TW/man1 /usr/share/man/fi/man1 /usr/share/dict /usr/share/doc/procps/examples /usr/share/doc/mawk/examples /usr/share/doc/libext2fs /usr/share/doc/adduser/examples/adduser.local.conf.examples/skel /usr/share/doc/adduser/examples/adduser.local.conf.examples/skel.other /usr/share/doc/sed/examples /usr/share/doc/libp11-kit0/examples /usr/share/doc/util-linux/releases /usr/share/doc/util-linux/examples /usr/share/doc/passwd/examples /usr/share/doc/libpam-modules/examples /usr/share/doc/gcc-7-base/mpx /usr/share/doc/gcc-7-base/gcc /usr/share/doc/gcc-7-base/sanitizer /usr/share/doc/gcc-7-base/itm /usr/share/doc/gcc-7-base/quadmath /usr/share/doc/gcc-7-base/cilkrts /usr/share/doc/gcc-7-base/C++ /usr/share/doc/gcc-7-base/gomp /usr/share/doc/xz-utils/extra/7z2lzma /usr/share/doc/xz-utils/extra/scanlzma /usr/share/doc/binutils/gprof /usr/share/doc/binutils/gas /usr/share/doc/binutils/bfd /usr/share/doc/binutils/ld /usr/share/doc/openssl/HOWTO /usr/share/doc/libreadline7/examples /usr/share/libsensors4 /usr/share/icons/Humanity-Dark/places/32 /usr/share/icons/Humanity-Dark/actions/24 /usr/share/icons/Humanity-Dark/actions/22 /usr/share/icons/ubuntu-mono-dark/stock/48 /usr/share/icons/ubuntu-mono-dark/stock/24 /usr/share/icons/ubuntu-mono-dark/stock/32 /usr/share/icons/ubuntu-mono-dark/stock/128 /usr/share/icons/ubuntu-mono-dark/stock/16 /usr/share/icons/ubuntu-mono-dark/apps/48 /usr/share/icons/ubuntu-mono-light/stock/48 /usr/share/icons/ubuntu-mono-light/stock/24 /usr/share/icons/ubuntu-mono-light/stock/32 /usr/share/icons/ubuntu-mono-light/stock/32 /usr/share/icons/ubuntu-mono-light/stock/128 /usr/share/icons/ubuntu-mono-light/stock/16 /usr/share/icons/ubuntu-mono-light/apps/48 /usr/share/icons/hicolor/24x24/places /usr/share/icons/hicolor/24x24/intl /usr/share/icons/hicolor/24x24/mimetypes /usr/share/icons/hicolor/24x24/filesystems /usr/share/icons/hicolor/24x24/actions /usr/share/icons/hicolor/24x24/categories /usr/share/icons/hicolor/24x24/emblems /usr/share/icons/hicolor/24x24/animations /usr/share/icons/hicolor/24x24/emotes /usr/share/icons/hicolor/24x24/stock/navigation /usr/share/icons/hicolor/24x24/stock/object /usr/share/icons/hicolor/24x24/stock/image /usr/share/icons/hicolor/24x24/stock/form /usr/share/icons/hicolor/24x24/stock/chart /usr/share/icons/hicolor/24x24/stock/media /usr/share/icons/hicolor/24x24/stock/io /usr/share/icons/hicolor/24x24/stock/net /usr/share/icons/hicolor/24x24/stock/table /usr/share/icons/hicolor/24x24/stock/text /usr/share/icons/hicolor/24x24/stock/data /usr/share/icons/hicolor/24x24/stock/code /usr/share/icons/hicolor/24x24/devices /usr/share/icons/hicolor/24x24/status /usr/share/icons/hicolor/512x512/places /usr/share/icons/hicolor/512x512/intl /usr/share/icons/hicolor/512x512/mimetypes /usr/share/icons/hicolor/512x512/filesystems /usr/share/icons/hicolor/512x512/actions /usr/share/icons/hicolor/512x512/categories /usr/share/icons/hicolor/512x512/emblems /usr/share/icons/hicolor/512x512/animations /usr/share/icons/hicolor/512x512/emotes /usr/share/icons/hicolor/512x512/stock/navigation /usr/share/icons/hicolor/512x512/stock/object /usr/share/icons/hicolor/512x512/stock/image /usr/share/icons/hicolor/512x512/stock/form /usr/share/icons/hicolor/512x512/stock/chart /usr/share/icons/hicolor/512x512/stock/media /usr/share/icons/hicolor/512x512/stock/io /usr/share/icons/hicolor/512x512/stock/net /usr/share/icons/hicolor/512x512/stock/table /usr/share/icons/hicolor/512x512/stock/text /usr/share/icons/hicolor/512x512/stock/data /usr/share/icons/hicolor/512x512/stock/code /usr/share/icons/hicolor/512x512/devices /usr/share/icons/hicolor/512x512/status /usr/share/icons/hicolor/512x512/apps /usr/share/icons/hicolor/symbolic/apps /usr/share/icons/hicolor/128x128/places /usr/share/icons/hicolor/128x128/intl /usr/share/icons/hicolor/128x128/mimetypes /usr/share/icons/hicolor/128x128/filesystems /usr/share/icons/hicolor/128x128/actions /usr/share/icons/hicolor/128x128/categories /usr/share/icons/hicolor/128x128/emblems /usr/share/icons/hicolor/128x128/animations /usr/share/icons/hicolor/128x128/emotes /usr/share/icons/hicolor/128x128/stock/navigation /usr/share/icons/hicolor/128x128/stock/object /usr/share/icons/hicolor/128x128/stock/image /usr/share/icons/hicolor/128x128/stock/form /usr/share/icons/hicolor/128x128/stock/chart /usr/share/icons/hicolor/128x128/stock/media /usr/share/icons/hicolor/128x128/stock/io /usr/share/icons/hicolor/128x128/stock/net /usr/share/icons/hicolor/128x128/stock/table /usr/share/icons/hicolor/128x128/stock/text /usr/share/icons/hicolor/128x128/stock/data /usr/share/icons/hicolor/128x128/stock/code /usr/share/icons/hicolor/128x128/stock/code /usr/share/icons/hicolor/128x128/devices /usr/share/icons/hicolor/128x128/status /usr/share/icons/hicolor/128x128/apps /usr/share/icons/hicolor/192x192/places /usr/share/icons/hicolor/192x192/intl /usr/share/icons/hicolor/192x192/mimetypes /usr/share/icons/hicolor/192x192/filesystems /usr/share/icons/hicolor/192x192/actions /usr/share/icons/hicolor/192x192/categories /usr/share/icons/hicolor/192x192/emblems /usr/share/icons/hicolor/192x192/animations /usr/share/icons/hicolor/192x192/emotes /usr/share/icons/hicolor/192x192/stock/navigation /usr/share/icons/hicolor/192x192/stock/object /usr/share/icons/hicolor/192x192/stock/image /usr/share/icons/hicolor/192x192/stock/form /usr/share/icons/hicolor/192x192/stock/chart /usr/share/icons/hicolor/192x192/stock/media /usr/share/icons/hicolor/192x192/stock/io /usr/share/icons/hicolor/192x192/stock/net /usr/share/icons/hicolor/192x192/stock/table /usr/share/icons/hicolor/192x192/stock/text /usr/share/icons/hicolor/192x192/stock/data /usr/share/icons/hicolor/192x192/stock/code /usr/share/icons/hicolor/192x192/devices /usr/share/icons/hicolor/192x192/status /usr/share/icons/hicolor/192x192/apps /usr/share/icons/hicolor/64x64/places /usr/share/icons/hicolor/64x64/intl /usr/share/icons/hicolor/64x64/mimetypes /usr/share/icons/hicolor/64x64/filesystems /usr/share/icons/hicolor/64x64/actions /usr/share/icons/hicolor/64x64/categories /usr/share/icons/hicolor/64x64/emblems /usr/share/icons/hicolor/64x64/animations /usr/share/icons/hicolor/64x64/emotes /usr/share/icons/hicolor/64x64/stock/navigation /usr/share/icons/hicolor/64x64/stock/object /usr/share/icons/hicolor/64x64/stock/image /usr/share/icons/hicolor/64x64/stock/form /usr/share/icons/hicolor/64x64/stock/chart /usr/share/icons/hicolor/64x64/stock/media /usr/share/icons/hicolor/64x64/stock/io /usr/share/icons/hicolor/64x64/stock/net /usr/share/icons/hicolor/64x64/stock/table /usr/share/icons/hicolor/64x64/stock/text /usr/share/icons/hicolor/64x64/stock/data /usr/share/icons/hicolor/64x64/stock/code /usr/share/icons/hicolor/64x64/devices /usr/share/icons/hicolor/64x64/status /usr/share/icons/hicolor/64x64/apps /usr/share/icons/hicolor/72x72/places /usr/share/icons/hicolor/72x72/intl /usr/share/icons/hicolor/72x72/mimetypes /usr/share/icons/hicolor/72x72/filesystems /usr/share/icons/hicolor/72x72/actions /usr/share/icons/hicolor/72x72/categories /usr/share/icons/hicolor/72x72/emblems /usr/share/icons/hicolor/72x72/animations /usr/share/icons/hicolor/72x72/emotes /usr/share/icons/hicolor/72x72/stock/navigation /usr/share/icons/hicolor/72x72/stock/object /usr/share/icons/hicolor/72x72/stock/image /usr/share/icons/hicolor/72x72/stock/form /usr/share/icons/hicolor/72x72/stock/chart /usr/share/icons/hicolor/72x72/stock/media /usr/share/icons/hicolor/72x72/stock/io /usr/share/icons/hicolor/72x72/stock/net /usr/share/icons/hicolor/72x72/stock/table /usr/share/icons/hicolor/72x72/stock/text /usr/share/icons/hicolor/72x72/stock/data /usr/share/icons/hicolor/72x72/stock/code /usr/share/icons/hicolor/72x72/stock/code /usr/share/icons/hicolor/72x72/devices /usr/share/icons/hicolor/72x72/status /usr/share/icons/hicolor/72x72/apps /usr/share/icons/hicolor/16x16/places /usr/share/icons/hicolor/16x16/intl /usr/share/icons/hicolor/16x16/mimetypes /usr/share/icons/hicolor/16x16/filesystems /usr/share/icons/hicolor/16x16/actions /usr/share/icons/hicolor/16x16/categories /usr/share/icons/hicolor/16x16/emblems /usr/share/icons/hicolor/16x16/animations /usr/share/icons/hicolor/16x16/emotes /usr/share/icons/hicolor/16x16/stock/navigation /usr/share/icons/hicolor/16x16/stock/object /usr/share/icons/hicolor/16x16/stock/image /usr/share/icons/hicolor/16x16/stock/form /usr/share/icons/hicolor/16x16/stock/chart /usr/share/icons/hicolor/16x16/stock/media /usr/share/icons/hicolor/16x16/stock/io /usr/share/icons/hicolor/16x16/stock/net /usr/share/icons/hicolor/16x16/stock/table /usr/share/icons/hicolor/16x16/stock/text /usr/share/icons/hicolor/16x16/stock/data /usr/share/icons/hicolor/16x16/stock/code /usr/share/icons/hicolor/16x16/devices /usr/share/icons/hicolor/16x16/status /usr/share/icons/hicolor/48x48/places /usr/share/icons/hicolor/48x48/intl /usr/share/icons/hicolor/48x48/mimetypes /usr/share/icons/hicolor/48x48/filesystems /usr/share/icons/hicolor/48x48/actions /usr/share/icons/hicolor/48x48/categories /usr/share/icons/hicolor/48x48/emblems /usr/share/icons/hicolor/48x48/animations /usr/share/icons/hicolor/48x48/emotes /usr/share/icons/hicolor/48x48/stock/navigation /usr/share/icons/hicolor/48x48/stock/object /usr/share/icons/hicolor/48x48/stock/image /usr/share/icons/hicolor/48x48/stock/form /usr/share/icons/hicolor/48x48/stock/chart /usr/share/icons/hicolor/48x48/stock/media /usr/share/icons/hicolor/48x48/stock/io /usr/share/icons/hicolor/48x48/stock/net /usr/share/icons/hicolor/48x48/stock/table /usr/share/icons/hicolor/48x48/stock/text /usr/share/icons/hicolor/48x48/stock/data /usr/share/icons/hicolor/48x48/stock/code /usr/share/icons/hicolor/48x48/devices /usr/share/icons/hicolor/48x48/status /usr/share/icons/hicolor/36x36/places /usr/share/icons/hicolor/36x36/intl /usr/share/icons/hicolor/36x36/mimetypes /usr/share/icons/hicolor/36x36/filesystems /usr/share/icons/hicolor/36x36/actions /usr/share/icons/hicolor/36x36/categories /usr/share/icons/hicolor/36x36/emblems /usr/share/icons/hicolor/36x36/animations /usr/share/icons/hicolor/36x36/emotes /usr/share/icons/hicolor/36x36/stock/navigation /usr/share/icons/hicolor/36x36/stock/object /usr/share/icons/hicolor/36x36/stock/image /usr/share/icons/hicolor/36x36/stock/form /usr/share/icons/hicolor/36x36/stock/chart /usr/share/icons/hicolor/36x36/stock/media /usr/share/icons/hicolor/36x36/stock/io /usr/share/icons/hicolor/36x36/stock/net /usr/share/icons/hicolor/36x36/stock/table /usr/share/icons/hicolor/36x36/stock/text /usr/share/icons/hicolor/36x36/stock/data /usr/share/icons/hicolor/36x36/stock/code /usr/share/icons/hicolor/36x36/devices /usr/share/icons/hicolor/36x36/status /usr/share/icons/hicolor/36x36/status /usr/share/icons/hicolor/36x36/apps /usr/share/icons/hicolor/scalable/places /usr/share/icons/hicolor/scalable/intl /usr/share/icons/hicolor/scalable/mimetypes /usr/share/icons/hicolor/scalable/filesystems /usr/share/icons/hicolor/scalable/actions /usr/share/icons/hicolor/scalable/categories /usr/share/icons/hicolor/scalable/emblems /usr/share/icons/hicolor/scalable/animations /usr/share/icons/hicolor/scalable/emotes /usr/share/icons/hicolor/scalable/stock/navigation /usr/share/icons/hicolor/scalable/stock/object /usr/share/icons/hicolor/scalable/stock/image /usr/share/icons/hicolor/scalable/stock/form /usr/share/icons/hicolor/scalable/stock/chart /usr/share/icons/hicolor/scalable/stock/media /usr/share/icons/hicolor/scalable/stock/io /usr/share/icons/hicolor/scalable/stock/net /usr/share/icons/hicolor/scalable/stock/table /usr/share/icons/hicolor/scalable/stock/text /usr/share/icons/hicolor/scalable/stock/data /usr/share/icons/hicolor/scalable/stock/code /usr/share/icons/hicolor/scalable/devices /usr/share/icons/hicolor/scalable/status /usr/share/icons/hicolor/256x256/places /usr/share/icons/hicolor/256x256/intl /usr/share/icons/hicolor/256x256/mimetypes /usr/share/icons/hicolor/256x256/filesystems /usr/share/icons/hicolor/256x256/actions /usr/share/icons/hicolor/256x256/categories /usr/share/icons/hicolor/256x256/emblems /usr/share/icons/hicolor/256x256/animations /usr/share/icons/hicolor/256x256/emotes /usr/share/icons/hicolor/256x256/stock/navigation /usr/share/icons/hicolor/256x256/stock/object /usr/share/icons/hicolor/256x256/stock/image /usr/share/icons/hicolor/256x256/stock/form /usr/share/icons/hicolor/256x256/stock/chart /usr/share/icons/hicolor/256x256/stock/media /usr/share/icons/hicolor/256x256/stock/io /usr/share/icons/hicolor/256x256/stock/net /usr/share/icons/hicolor/256x256/stock/table /usr/share/icons/hicolor/256x256/stock/text /usr/share/icons/hicolor/256x256/stock/data /usr/share/icons/hicolor/256x256/stock/code /usr/share/icons/hicolor/256x256/devices /usr/share/icons/hicolor/256x256/status /usr/share/icons/hicolor/256x256/apps /usr/share/icons/hicolor/22x22/places /usr/share/icons/hicolor/22x22/intl /usr/share/icons/hicolor/22x22/mimetypes /usr/share/icons/hicolor/22x22/filesystems /usr/share/icons/hicolor/22x22/actions /usr/share/icons/hicolor/22x22/categories /usr/share/icons/hicolor/22x22/emblems /usr/share/icons/hicolor/22x22/animations /usr/share/icons/hicolor/22x22/emotes /usr/share/icons/hicolor/22x22/stock/navigation /usr/share/icons/hicolor/22x22/stock/object /usr/share/icons/hicolor/22x22/stock/image /usr/share/icons/hicolor/22x22/stock/form /usr/share/icons/hicolor/22x22/stock/chart /usr/share/icons/hicolor/22x22/stock/media /usr/share/icons/hicolor/22x22/stock/io /usr/share/icons/hicolor/22x22/stock/net /usr/share/icons/hicolor/22x22/stock/table /usr/share/icons/hicolor/22x22/stock/text /usr/share/icons/hicolor/22x22/stock/data /usr/share/icons/hicolor/22x22/stock/code /usr/share/icons/hicolor/22x22/devices /usr/share/icons/hicolor/22x22/status /usr/share/icons/hicolor/22x22/apps /usr/share/icons/hicolor/22x22/apps /usr/share/icons/hicolor/32x32/places /usr/share/icons/hicolor/32x32/intl /usr/share/icons/hicolor/32x32/mimetypes /usr/share/icons/hicolor/32x32/filesystems /usr/share/icons/hicolor/32x32/actions /usr/share/icons/hicolor/32x32/categories /usr/share/icons/hicolor/32x32/emblems /usr/share/icons/hicolor/32x32/animations /usr/share/icons/hicolor/32x32/emotes /usr/share/icons/hicolor/32x32/stock/navigation /usr/share/icons/hicolor/32x32/stock/object /usr/share/icons/hicolor/32x32/stock/image /usr/share/icons/hicolor/32x32/stock/form /usr/share/icons/hicolor/32x32/stock/chart /usr/share/icons/hicolor/32x32/stock/media /usr/share/icons/hicolor/32x32/stock/io /usr/share/icons/hicolor/32x32/stock/net /usr/share/icons/hicolor/32x32/stock/table /usr/share/icons/hicolor/32x32/stock/text /usr/share/icons/hicolor/32x32/stock/data /usr/share/icons/hicolor/32x32/stock/code /usr/share/icons/hicolor/32x32/devices /usr/share/icons/hicolor/32x32/status /usr/share/icons/hicolor/96x96/places /usr/share/icons/hicolor/96x96/intl /usr/share/icons/hicolor/96x96/mimetypes /usr/share/icons/hicolor/96x96/filesystems /usr/share/icons/hicolor/96x96/actions /usr/share/icons/hicolor/96x96/categories /usr/share/icons/hicolor/96x96/emblems /usr/share/icons/hicolor/96x96/animations /usr/share/icons/hicolor/96x96/emotes /usr/share/icons/hicolor/96x96/stock/navigation /usr/share/icons/hicolor/96x96/stock/object /usr/share/icons/hicolor/96x96/stock/image /usr/share/icons/hicolor/96x96/stock/form /usr/share/icons/hicolor/96x96/stock/chart /usr/share/icons/hicolor/96x96/stock/media /usr/share/icons/hicolor/96x96/stock/io /usr/share/icons/hicolor/96x96/stock/net /usr/share/icons/hicolor/96x96/stock/table /usr/share/icons/hicolor/96x96/stock/text /usr/share/icons/hicolor/96x96/stock/data /usr/share/icons/hicolor/96x96/stock/code /usr/share/icons/hicolor/96x96/devices /usr/share/icons/hicolor/96x96/status /usr/share/icons/hicolor/96x96/apps /usr/share/git-core/templates/branches /usr/include/hwloc/autogen /usr/src/linux-headers-4.15.0-176-generic/.tmp_versions /usr/games /usr/local/share/jupyter/nbconvert/templates /usr/local/share/icons/hicolor/scalable /usr/local/share/ca-certificates /usr/local/share/fonts /usr/local/src /usr/local/games /usr/local/lib/python3.7/dist-packages/doc /usr/local/lib/python2.7/site-packages /usr/local/lib/python3.6/dist-packages /usr/local/cuda-10.1/libnvvp/p2/org.eclipse.equinox.p2.engine/profileRegistry/DefaultProf ile.profile/.data /usr/local/cuda-10.1/samples/7_CUDALibraries/common/FreeImage/lib/x64 /usr/local/cuda-10.1/samples/6_Advanced/fastWalshTransform/doc /usr/local/cuda-10.1/samples/3_Imaging/dwtHaar1D/doc /usr/local/cuda-11.0/libnvvp/p2/org.eclipse.equinox.p2.engine/profileRegistry/DefaultProf ile.profile/.data /usr/local/cuda-11.0/samples/7_CUDALibraries/common/FreeImage/lib/x64 /usr/local/cuda-11.0/samples/6_Advanced/fastWalshTransform/doc /usr/local/cuda-11.0/samples/3_Imaging/dwtHaar1D/doc /usr/local/cuda-10.0/libnvvp/p2/org.eclipse.equinox.p2.engine/profileRegistry/DefaultProf ile.profile/.data ile.profile/.data /usr/local/cuda-10.0/samples/7_CUDALibraries/common/FreeImage/lib/x64 /usr/local/cuda-10.0/samples/6_Advanced/fastWalshTransform/doc /usr/local/cuda-10.0/samples/3_Imaging/dwtHaar1D/doc /usr/local/cuda-11.1/targets/x86_64-linux/include/thrust/cmake /usr/local/cuda-11.1/targets/x86_64-linux/include/cub/cmake /usr/local/cuda-11.1/libnvvp/p2/org.eclipse.equinox.p2.engine/profileRegistry/DefaultProf ile.profile/.data /usr/local/cuda-11.1/samples/7_CUDALibraries/common/FreeImage/lib/x64 /usr/local/cuda-11.1/samples/6_Advanced/fastWalshTransform/doc /usr/local/cuda-11.1/samples/3_Imaging/dwtHaar1D/doc /usr/lib/x86_64-linux-gnu/krb5/plugins/libkrb5 /usr/lib/gcc/x86_64-linux-gnu/8 /usr/lib/tar /usr/lib/R/site-library/waldo/help/figures /usr/lib/R/library/methods/html /usr/lib/R/library/compiler/html /usr/lib/R/library/stats/html /usr/lib/R/library/splines/html /usr/lib/R/library/utils/html /usr/lib/R/library/stats4/html /usr/lib/R/library/base/html /usr/lib/R/library/grid/html /usr/lib/R/library/tools/html /usr/lib/R/library/parallel/html /usr/lib/R/library/grDevices/html /usr/lib/R/library/graphics/html /usr/lib/R/library/tcltk/html /usr/lib/R/library/datasets/html /usr/lib/modules-load.d /usr/lib/systemd/user-generators /usr/lib/systemd/tests/testdata /usr/lib/groff/site-tmac /usr/lib/debug/usr/lib/jvm/java-11-openjdk-amd64 /usr/lib/binfmt.d /usr/lib/X11 /usr/lib/sasl2 /lib/systemd/system/runlevel5.target.wants /lib/systemd/system/runlevel3.target.wants /lib/systemd/system/runlevel2.target.wants /lib/systemd/system/runlevel1.target.wants /lib/systemd/system/runlevel4.target.wants /lib/systemd/system-shutdown /lib/systemd/system-sleep /python-apt/.git/refs/tags /python-apt/.git/objects/info /python-apt/.git/branches find: find: find: find: ‘/proc/29/task/29/net’: ‘/proc/29/task/29/net’: ‘/proc/29/net’: Invalid ‘/proc/29/net’: Invalid Invalid argument Invalid argument argument argument Bài tập 16 In [59]: %%bash grep -n root /etc/passwd 1:root:x:0:0:root:/root:/bin/bash In [60]: %%bash grep -v -n root /etc/passwd 2:daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin 3:bin:x:2:2:bin:/bin:/usr/sbin/nologin 4:sys:x:3:3:sys:/dev:/usr/sbin/nologin 5:sync:x:4:65534:sync:/bin:/bin/sync 6:games:x:5:60:games:/usr/games:/usr/sbin/nologin 7:man:x:6:12:man:/var/cache/man:/usr/sbin/nologin 8:lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin 9:mail:x:8:8:mail:/var/mail:/usr/sbin/nologin 10:news:x:9:9:news:/var/spool/news:/usr/sbin/nologin 11:uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin 12:proxy:x:13:13:proxy:/bin:/usr/sbin/nologin 13:www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin 14:backup:x:34:34:backup:/var/backups:/usr/sbin/nologin 15:list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin 16:irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin 17:gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin 18:nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin 19:_apt:x:100:65534::/nonexistent:/usr/sbin/nologin 20:systemd-network:x:101:104:systemd Network Management,,,:/run/systemd/netif:/usr/sbin/n ologin 21:systemd-resolve:x:102:105:systemd Resolver,,,:/run/systemd/resolve:/usr/sbin/nologin 22:messagebus:x:103:107::/nonexistent:/usr/sbin/nologin 23:nvidia-persistenced:x:104:108:NVIDIA Persistence Daemon,,,:/nonexistent:/usr/sbin/nolo gin 24:phuong748:x:1000:1000::/home/phuong748:/bin/sh In [61]: %%bash grep -l "echo" /etc/init.d/* /etc/init.d/dbus /etc/init.d/kmod /etc/init.d/procps /etc/init.d/rsync /etc/init.d/udev In [62]: %%bash grep -v "#" /etc/login.defs MAIL_DIR /var/mail FAILLOG_ENAB yes LOG_UNKFAIL_ENAB no LOG_OK_LOGINS SYSLOG_SU_ENAB SYSLOG_SG_ENAB no yes yes FTMP_FILE /var/log/btmp SU_NAME su HUSHLOGIN_FILE hushlogin ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games TTYGROUP tty TTYPERM 0600 ERASECHAR 0177 KILLCHAR 025 UMASK 022 PASS_MAX_DAYS 99999 PASS_MIN_DAYS PASS_WARN_AGE UID_MIN UID_MAX 1000 60000 GID_MIN GID_MAX 1000 60000 LOGIN_RETRIES LOGIN_TIMEOUT 60 CHFN_RESTRICT rwh DEFAULT_HOME yes USERGROUPS_ENAB yes ENCRYPT_METHOD SHA512 In [63]: %%bash cat /etc/passwd | grep "/bin/bash" | cut -d":" -f1 root Bài tập 17 In [64]: %%bash cd ls > one cat one bprofile dir1 dir2 helloword.txt lbprofile one passwd rm three three two vidub2004746 vuphuong In [65]: %%bash cd who | tee users cat users In [66]: %%bash cd ps -A | tee -a users PID 18 29 30 43 44 58 81 98 771 772 773 TTY ? ? ? ? ? ? ? ? ? ? ? ? ? TIME 00:00:00 00:00:06 00:00:00 00:00:06 00:00:00 00:00:05 00:00:02 00:00:19 00:00:04 00:00:10 00:00:00 00:00:00 00:00:00 CMD docker-init node tail python3 colab-fileshim jupyter-noteboo dap_multiplexer python3 python3 node bash ps tee In [67]: %%bash cd ls /etc | more adduser.conf alternatives apparmor.d apt bash.bashrc bash_completion.d bindresvport.blacklist binfmt.d ca-certificates ca-certificates.conf ca-certificates.conf.dpkg-old calendar cron.daily cron.weekly dbus-1 debconf.conf debian_version default deluser.conf depmod.d dhcp dkms dpkg emacs environment ffserver.conf fonts fstab fuse.conf gai.conf glvnd groff group groupgshadow gshadowgss gtk-3.0 host.conf hostname hosts hosts.allow hosts.deny init.d inputrc ipython issue issue.net java-11-openjdk jupyter kernel ldap ld.so.cache ld.so.conf ld.so.conf.d legal libaudit.conf libibverbs.d libnl-3 libpaper.d locale.alias locale.gen localtime logcheck login.defs logrotate.d lsb-release machine-id mailcap mailcap.order manpath.config mime.types mke2fs.conf modprobe.d modules modules-load.d mtab mysql networks nsswitch.conf ODBCDataSources odbc.ini odbcinst.ini openal OpenCL openmpi opt os-release pam.conf pam.d papersize passwd passwdperl pip.conf polkit-1 profile profile.d pulse python python2.7 python3 python3.6 python3.7 R rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rcS.d resolv.conf rmt securetty security selinux sensors3.conf sensors.d shadow shadowshells skel ssh ssl subgid subgidsubuid subuidsudoers sudoers.d sysctl.conf sysctl.d systemd terminfo timezone tmpfiles.d ucf.conf udev update-motd.d vdpau_wrapper.cfg wgetrc X11 xdg In [68]: %%bash wc /etc/passwd 24 34 1294 /etc/passwd In [69]: %%bash sort /etc/group adm:x:4: audio:x:29: backup:x:34: bin:x:2: cdrom:x:24: daemon:x:1: dialout:x:20: dip:x:30: disk:x:6: fax:x:21: floppy:x:25: games:x:60: gnats:x:41: input:x:106: irc:x:39: kmem:x:15: list:x:38: lp:x:7: mail:x:8: man:x:12: messagebus:x:107: news:x:9: nogroup:x:65534: nvidia-persistenced:x:108: operator:x:37: phuong748:x:1000: plugdev:x:46: proxy:x:13: rdma:x:102: root:x:0: sasl:x:45: shadow:x:42: src:x:40: ssh:x:101: staff:x:50: sudo:x:27: systemd-journal:x:103: systemd-network:x:104: systemd-resolve:x:105: sys:x:3: tape:x:26: tty:x:5: users:x:100: utmp:x:43: uucp:x:10: video:x:44: voice:x:22: www-data:x:33: In [70]: %%bash cd /var/spool/mail ls -l -S total In [73]: !bash bash: cannot set terminal process group (58): Inappropriate ioctl for device bash: no job control in this shell /content# cat >> vp A Cuu > Bui Kim Yen > Cao Lanh Tuyet > OK /content# sort vp | tee vp A Cuu A Cuu Bui Kim Yen Bui Kim Yen Cao Lanh Tuyet Cao Lanh Tuyet Doan Van Doan Van /content# cat vp A Cuu A Cuu Bui Kim Yen Bui Kim Yen Cao Lanh Tuyet Cao Lanh Tuyet Doan Van Doan Van /content# exit exit Bài tập 18 In [74]: %%bash cd touch commands In [75]: %%bash cd sort -r commands | head -1 Giải thích: Sắp xếp nội dung tập tin commands theo thứ tự giảm dần sau in hình dịng In [76]: %%bash cd grep ^c commands | wc -l Giải thích: Lọc lại dòng mà bắt đầu chữ c nội dung tập tin commands, sau hiển thị hình tổng số dịng vừa lọc In [77]: %%bash cd grep at commands | sort | head -1 Giải thích: Lọc tập tin commands dịng chứa hai kí tự at, sau xếp lại dịng vừa lọc theo thứ tự tăng dần hiển thị hình dịng ... thư mục ddd Bài Trong hệ thống tập tin linux, thư mục chứa tập tin cấu hình hệ thống thư mục: /etc Bài Hai thư mục hệ thống tập tin linux có chứa tập tin thư viện lệnh: lib lib32 Bài Thư mục... hello1 rm rm reply Tập tin reply xóa thành cơng Vì dùng lệnh rm reply hệ thống ưu tiên hiểu ta dùng lệnh rm(remove) với đối số reply -> File reply xóa thành công Bài tập 14 Lệnh more: Dùng để xem... thay đổi như: tập tin log hệ thống, mail tập tin Nội dung: Chứa tập tin liệu thường xuyên thay đổi như: tập tin log hệ thống, mail tập tin ghi nhận in ấn… Quyền: rwxr-xr-x Bài tập drwxr-xr abc users