1. Trang chủ
  2. » Công Nghệ Thông Tin

Bài TH1 CT178 Nguyên lý hệ điều hành

10 11 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 159,75 KB

Nội dung

BaiTH01 Bài 1 In 17 %%bash cd usrlocalbin echo PATH pwd ls 1 optbin usrlocalnvidiabin usrlocalcudabin usrlocalsbin usrlocalbin usrsb in usrbin sbin bin toolsnodebin too.

Bài In [17]: %%bash cd /usr/local/bin echo $PATH pwd ls -1 /opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sb in:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin /usr/local/bin bokeh censusgeocode chardetect cmake colab-fileshim.py colorcet community convert-caffe2-to-onnx convert-onnx-to-caffe2 coverage coverage3 coverage-3.7 coveralls cpack ctest cygdb cython cythonize dap_multiplexer dask-mpi dask-remote dask-scheduler dask-ssh dask-submit dask-worker doesitcache earthengine easy_install easy_install-2.7 estimator_ckpt_converter f2py f2py3 f2py3.7 fits2bitmap fitscheck fitsdiff fitsheader fitsinfo flask futurize gdown get_objgraph google google-oauthlib-tool holoviews hyperopt-mongo-worker imageio_download_bin imageio_remove_bin import_pb_to_tensorboard install_cmdstan install_cxx_toolchain iptest iptest3 ipython ipython3 isympy isympy jsonschema jupyter jupyter-bundlerextension jupyter-console jupyter-execute jupyter-kernel jupyter-kernelspec jupyter-migrate jupyter-nbconvert jupyter-nbextension jupyter-notebook jupyter-qtconsole jupyter-run jupyter-serverextension jupyter-troubleshoot jupyter-trust kaggle lsm2bin lunar-find make_image_classifier make_nearest_neighbour_index markdown_py natsort nc3tonc4 nc4tonc3 ncinfo nib-dicomfs nib-diff nib-ls nib-nifti-dx nib-tck2trk nib-trk2tck normalizer nsight-sys nsys nsys-ui numba panel parrec2nii pasteurize pip pip2 pip2.7 pip3 pip3.7 pip-compile pip-sync plac_runner.py plasma_store portserver.py pt2to3 ptdump ptrepack pttree pybabel pycache pycc pyct pygmentize pyrsa-decrypt pyrsa-encrypt pyrsa-keygen pyrsa-priv2pub pyrsa-sign pyrsa-verify pysemver pytest py.test python R range-detector rst2html4.py rst2html4.py rst2html5.py rst2html.py rst2latex.py rst2man.py rst2odt_prepstyles.py rst2odt.py rst2pseudoxml.py rst2s5.py rst2xetex.py rst2xml.py rstpep2html.py runxlrd.py samp_hub sample saved_model_cli send2trash showtable skivi spacy sphinx-apidoc sphinx-autogen sphinx-build sphinx-quickstart sqlformat tabulate tensorboard test-importability.py tfds tflite_convert tf_upgrade_v2 theano-cache tiff2fsspec tiffcomment tifffile toco toco_from_protos torchrun tqdm undill volint wcslint wheel wordcloud_cli Bài In [5]: %%bash cd / pwd cd /bin pwd cd /usr/local/bin pwd cd pwd cd ~ pwd / /bin /usr/local/bin /usr/local /root Bài In [6]: %%bash cd /usr pwd echo "echo 'Xin chao!!!'" >hello chmod 755 hello pwd sh hello cd ~ sh hello /usr /usr Xin chao!!! sh: 0: Can't open hello Bài In [7]: %%bash sh /usr/hello Xin chao!!! Bài In [16]: %%bash echo $PATH PATH=$PATH:/usr: echo $PATH cd hello /opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sb in:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin /opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sb in:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin:/usr bash: line 4: cd: hello: No such file or directory Bài In [11]: %%bash ls -l /usr/local/bin ls -l / total 8364 -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -r-xr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -r-xr-xr-x -rwxr-xr-x 1 1 1 1 1 1 1 1 1 1 root root root root root root root root root root root root root root root root root root root root root 213 Mar root 221 Mar root 221 Mar root 206 Mar root 4285 Jan root 216 Mar root 875 Mar root 252 Mar root 252 Mar root 207 Mar root 207 Mar root 207 Mar root 212 Mar root 206 Mar root 206 Mar root 220 Mar root 241 Mar root 221 Mar root 7845293 Jan root 219 Mar 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 14:31 14:31 14:29 14:34 2000 14:31 14:32 14:30 14:30 14:23 14:23 14:23 14:23 14:34 14:34 14:23 14:23 14:23 2000 14:34 bokeh censusgeocode chardetect cmake colab-fileshim.py colorcet community convert-caffe2-to-onnx convert-onnx-to-caffe2 coverage coverage3 coverage-3.7 coveralls cpack ctest cygdb cython cythonize dap_multiplexer dask-mpi -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x lrwxrwxrwx lrwxrwxrwx lrwxrwxrwx 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 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 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 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 root root 219 222 225 219 222 222 216 211 230 230 263 216 216 216 240 232 231 233 231 208 215 208 1651 5501 233 221 216 241 237 247 224 230 231 231 224 224 205 213 219 233 218 211 223 261 219 221 220 219 221 240 224 224 252 209 215 220 271 277 214 215 220 220 216 222 219 217 223 222 222 244 28 22 25 Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 14:34 14:34 14:34 14:34 14:34 14:34 14:31 14:34 14:18 14:18 14:31 14:23 14:23 14:23 14:34 14:34 14:34 14:34 14:34 14:31 14:30 14:32 14:31 14:32 14:30 14:32 14:32 14:31 14:31 14:31 14:31 14:31 14:29 14:29 14:29 14:29 14:32 14:29 14:23 14:30 14:32 14:23 14:29 14:29 14:23 14:29 14:30 14:30 14:23 14:29 14:30 14:23 14:23 14:32 14:23 14:31 14:32 14:32 14:30 14:32 14:31 14:31 14:31 14:32 14:32 14:32 14:32 14:32 14:32 14:23 14:10 14:10 14:10 dask-mpi dask-remote dask-scheduler dask-ssh dask-submit dask-worker doesitcache earthengine easy_install easy_install-2.7 estimator_ckpt_converter f2py f2py3 f2py3.7 fits2bitmap fitscheck fitsdiff fitsheader fitsinfo flask futurize gdown get_objgraph google google-oauthlib-tool holoviews hyperopt-mongo-worker imageio_download_bin imageio_remove_bin import_pb_to_tensorboard install_cmdstan install_cxx_toolchain iptest iptest3 ipython ipython3 isympy jsonschema jupyter jupyter-bundlerextension jupyter-console jupyter-execute jupyter-kernel jupyter-kernelspec jupyter-migrate jupyter-nbconvert jupyter-nbextension jupyter-notebook jupyter-qtconsole jupyter-run jupyter-serverextension jupyter-troubleshoot jupyter-trust kaggle lsm2bin lunar-find make_image_classifier make_nearest_neighbour_index markdown_py natsort nc3tonc4 nc4tonc3 ncinfo nib-dicomfs nib-diff nib-ls nib-nifti-dx nib-tck2trk nib-trk2tck normalizer nsight-sys -> /etc/alternatives/nsight-sys nsys -> /etc/alternatives/nsys nsys-ui -> /etc/alternatives/nsys-ui lrwxrwxrwx -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -r-xr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x drwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -r-xr-xr-x -r-xr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -r-xr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 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 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 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 root root 25 188 212 225 217 1374 217 217 221 221 221 218 2379 248 13334 220 220 222 220 222 4096 54 212 215 212 212 210 233 206 210 205 205 205 1374 377 2855 714 1082 594 791 599 1726 764 601 637 871 602 670 16253 234 205 238 218 230 220 32 216 230 215 220 216 209 223 3991 247 236 248 215 219 219 207 236 243 Mar Mar Mar Mar Mar Jan Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Jan Jan Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Mar Jan Mar Mar Mar Mar Mar Mar Mar Mar Mar 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 1 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 14:10 14:30 14:31 14:32 14:30 2000 14:18 14:18 14:17 14:17 14:32 14:32 14:29 14:31 14:32 14:32 14:32 14:32 14:32 14:23 14:32 14:30 14:30 14:29 14:29 14:29 14:29 14:29 14:29 14:29 14:31 14:32 14:32 2000 2000 14:32 14:23 14:23 14:23 14:23 14:23 14:23 14:23 14:23 14:23 14:23 14:23 14:23 14:31 14:34 14:32 14:31 14:23 14:34 14:31 14:31 14:23 14:23 14:23 14:23 14:31 14:32 14:31 2000 14:32 14:31 14:31 14:31 14:23 14:23 14:23 14:31 14:31 nsys-ui -> /etc/alternatives/nsys-ui numba panel parrec2nii pasteurize pip pip2 pip2.7 pip3 pip3.7 pip-compile pip-sync plac_runner.py plasma_store portserver.py pt2to3 ptdump ptrepack pttree pybabel pycache pycc pyct pygmentize pyrsa-decrypt pyrsa-encrypt pyrsa-keygen pyrsa-priv2pub pyrsa-sign pyrsa-verify pysemver pytest py.test python R range-detector rst2html4.py rst2html5.py rst2html.py rst2latex.py rst2man.py rst2odt_prepstyles.py rst2odt.py rst2pseudoxml.py rst2s5.py rst2xetex.py rst2xml.py rstpep2html.py runxlrd.py samp_hub sample saved_model_cli send2trash showtable skivi spacy sphinx-apidoc sphinx-autogen sphinx-build sphinx-quickstart sqlformat tabulate tensorboard test-importability.py tfds tflite_convert tf_upgrade_v2 theano-cache tiff2fsspec tiffcomment tifffile toco toco_from_protos -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x -rwxr-xr-x total 96 drwxr-xr-x drwxr-xr-x drwxr-xr-x drwxr-xr-x drwxr-xr-x drwxr-xr-x drwxr-xr-x drwxr-xr-x drwxr-xr-x drwxr-xr-x drwxr-xr-x drwxr-xr-x drwxr-xr-x dr-xr-xr-x drwxr-xr-x drwx -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 1 1 1 root root root root root root root root 1 2 2 169 14 1 12 1 1 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 root root root root root root root root root root root root root root root root root root root root root root 243 220 207 587 224 218 208 217 4096 4096 4096 4096 360 4096 4096 4096 4096 4096 4096 4096 4096 4096 4096 4096 4096 4096 4096 4096 4096 4096 4096 Mar Mar Mar Mar Mar Mar Mar Mar Mar Apr Mar Mar Apr Apr Apr Mar Mar Mar Nov Nov Mar Apr Mar Apr Mar Apr Nov Apr Mar Apr Mar Apr Apr 23 23 23 23 23 23 23 23 23 24 23 28 1 24 23 23 23 19 19 23 23 23 19 23 28 1 Bài In [10]: %%bash # apt install file cd /usr ls file hello less hello bin games grte hello include lib lib32 local sbin share src echo 'Xin chao!!!' bash: line 4: file: command not found Bài In [24]: %%bash apt install tree cd /root/ mkdir Myweb cd /Myweb mkdir images databases scripts java 14:31 14:30 14:29 14:31 14:34 14:34 14:18 14:31 14:11 2018 14:22 13:12 07:15 07:15 2018 14:13 14:00 14:00 2020 2020 14:14 07:15 14:14 07:15 14:03 07:15 2020 07:15 14:36 07:16 13:12 07:20 07:15 toco_from_protos torchrun tqdm undill volint wcslint wheel wordcloud_cli bin boot content datalab dev etc home lib lib32 lib64 media mnt opt proc python-apt root run sbin srv sys tensorflow-1.15.2 tmp tools usr var cd /images mkdir icon background animation tree /root/Myweb Reading package lists Building dependency tree Reading state information The following NEW packages will be installed: tree upgraded, newly installed, to remove and 39 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 (64.3 kB/s) Selecting previously unselected package tree (Reading database 156210 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) /root/Myweb ├── databases ├── images │ ├── animation │ ├── background │ └── icon ├── java └── scripts directories, files WARNING: apt does not have a stable CLI interface Use with caution in scripts Bài In [25]: %%bash cd /tools/google-cloud-sdk/platform/gsutil_py2/third_party/httplib2/doc/html pwd # find -name "*.html" # cp genindex.html index.html /root/Myweb/ cd / find -name "*.class" cd /usr/share/R/share/java/ pwd cp getsp.class /root/Myweb/scripts tree /root/Myweb /tools/google-cloud-sdk/platform/gsutil_py2/third_party/httplib2/doc/html /usr/share/R/share/java/getsp.class /usr/share/R/share/java /root/Myweb ├── databases ├── images │ ├── animation │ ├── background │ └── icon ├── java └── scripts └── getsp.class directories, file find: ‘./proc/28/task/28/net’: Invalid argument find: ‘./proc/28/net’: Invalid argument Bài 10 In [26]: In [26]: %%bash cd /root/Myweb/scripts/ mv getsp.class /root/Myweb/java/ tree /root/Myweb /root/Myweb ├── databases ├── images │ ├── animation │ ├── background │ └── icon ├── java │ └── getsp.class └── scripts directories, file Bài 11 In [29]: %%bash rm -r /root/Myweb/scripts /root/Myweb/images/animation/ tree /root/Myweb /root/Myweb ├── databases ├── images │ ├── background │ └── icon └── java └── getsp.class directories, file rm: cannot remove '/root/Myweb/scripts': No such file or directory rm: cannot remove '/root/Myweb/images/animation/': No such file or directory Bài 12 In [31]: %%bash ls -l /root/Myweb/ cd /root/Myweb/ chmod 700 databases ls -l /root/Myweb/ total 12 drwx -drwxr-xr-x drwxr-xr-x total 12 drwx -drwxr-xr-x drwxr-xr-x root root 4096 Apr root root 4096 Apr root root 4096 Apr 07:30 databases 07:30 images 07:30 java root root 4096 Apr root root 4096 Apr root root 4096 Apr 07:30 databases 07:30 images 07:30 java Bài 13 In [32]: %%bash ls -l /root/Myweb/ cd /root/Myweb/ chmod 711 java ls -l /root/Myweb/ total 12 drwx root root 4096 Apr drwxr-xr-x root root 4096 Apr 07:30 databases 07:30 images drwxr-xr-x drwxr-xr-x total 12 drwx -drwxr-xr-x drwx x x root root 4096 Apr root root 4096 Apr 07:30 images 07:30 java root root 4096 Apr root root 4096 Apr root root 4096 Apr 07:30 databases 07:30 images 07:30 java Bài 14 -Được sử dụng để thay đổi quyền truy xuất file hello: Chủ sở hữu có tồn quyền, nhóm sở hữu người dùng khác có quyền đọc thực thi, khơng có quyền ghi ... undill volint wcslint wheel wordcloud_cli Bài In [5]: %%bash cd / pwd cd /bin pwd cd /usr/local/bin pwd cd pwd cd ~ pwd / /bin /usr/local/bin /usr/local /root Bài In [6]: %%bash cd /usr pwd echo "echo... pwd sh hello cd ~ sh hello /usr /usr Xin chao!!! sh: 0: Can''t open hello Bài In [7]: %%bash sh /usr/hello Xin chao!!! Bài In [16]: %%bash echo $PATH PATH=$PATH:/usr: echo $PATH cd hello /opt/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sb... 1 Bài In [10]: %%bash # apt install file cd /usr ls file hello less hello bin games grte hello include lib lib32 local sbin share src echo ''Xin chao!!!'' bash: line 4: file: command not found Bài

Ngày đăng: 23/12/2022, 10:46

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w