Skip to content

Latest commit

 

History

History
executable file
·
65 lines (54 loc) · 1.45 KB

File metadata and controls

executable file
·
65 lines (54 loc) · 1.45 KB
the home directoires
  • /root,/home/<username>
the bin directories
  • /bin,/usr/bin,/usr/local/bin
  • /sbin,/usr/sbin,/usr/local/sbin
foregin filesystem mountpoints
  • /media,/mnt
linux file hierarchy concepts
  • /etc -system config files
  • /tmp -temporary files
  • /boot -kernel and bootloader
  • /dev -device
  • /usr -programs
  • /lost+found
  • /var,/srv -server data
  • /proc -system information
  • /lib,/usr/lib,/usr/local/lib -libraries
changing directories
  • pwd
  • cd ~/Documents
  • cd /usr/local/doc
  • cd ..
  • cd -
  • cd
listing directory contents
  • ls
  • ls /
  • ls -a
  • ls -l /usr
  • ls -ld
copying files and directories
  • cp file1 ~/
  • cp -r doc ~/
  • cp -a doc ~/
moving and rename files and directories
  • mv doc/file1 source
  • mv doc/file2 doc/file2 source
  • rm doc/file1
  • rm -r doc/
  • rm -fr /home/mskv/tmp/
creating and removing files
  • touch /home/mskv/newfile 建立档案如果存在,只更新时间戳
  • mkdir ~/newdir
  • rm newdir 移除空目录
  • rm -rf ~/newdir2
using nautilus
  • nautilus

  • file ~/file1

viewing an entire test file
  • cat file1
  • cat -A file1
  • cat -s file1
  • cat -b file1
  • less file1