3
direcoty
- / => root direcotry
- /boot => important file need while booting such as kernel files
- /dev => devices access files such as terminal
- /etc => configuration files, programn
- /home => directory home for user
- /root => direcoty for user root
- /opt => optional (file tambahan, layanan aplikasai)
-
/tmp => tempoery (file sementara akan terhapus ketika di reboot)
- /bin => (binaries) executable file
- /sbin => executable file for root
- /var => constantly changing data such as log files
- /var/log => log
- /var/www => file web
- etc
- /lib => libraries essential for binaries on the system
- /lib32
- /lib32x
- /lib64
- /usr
- /usr/bin
- /usr/lib
- /usr/…
- /proc => process running
- /run => file status aplikasi, termasuk socket unix
-
/srv => file server such as ftp, apache, etc
- /mnt => mounted filesystems
- /media => mounted filesystem
-
/cdroom => version old for mount iso
- lost+found => file yang berhasil dipulihkan setelah crash
command
df # show disk
df -h # with show k, m, g
df T # type file (xfs, ext, etc)
df -hT / -i # inodes # semacam node gitu
du # disk usage
du ~ -sh # human readable
du ~ -sc # total
du *.txt
du -sh --exclaude="*.txt"
-
- h => human readable
- t => type
- s => summary
- c => total
archive
tar
tar -cf arcive.tar.gz <target>
# target => folder / file1 file2
tar -xf arvice.tar.gz
tar -cfz a.tar.gz <target> # comprese
tar -tf a.tar.gz
tar -tvf a.tar.gz
- c => create
- f => file
- x => extract
- z => compress
- t => list
- v => verbose
zip
zip zip_teks <target> # otomatis jadi .zip => zip_teks.zip
zip zip.zip <target>
zip -e aria *.txt # encrypt
unzip zip.zip
search file
find
find # show all file withh recursive file for all
find file* # file.txt file.png
find *
find -iname FiLe.TxT # show with unsensitive
find name?? # name01 name03 name13 nameme
* => any string
? => one letter
find ~ -maxdepth 1 # show with depth 1
find -size +10k -size 10M 2>/dev/null