File System Flashcards
(22 cards)
Hoe krijg je je command prompt terug
Ctrl + c
Hoe beweeg je navigating in je file system
cd map cd ..
pwd
ls ls -l /ll ll -tr
Hoe maak je files en folders
Touch naam1 naam2 naam3
Vi
nano
Mkdir (multi/enkel)
Command voor kopie
Cp filename
Cp -r folder-of filename
Hoe kan je files en folders vinden
Find (./~) -name “naam”
Locate. name Updatedb in su
Links hoe gebruik je die
Ln file-name
In -s file-name
File permission
Algemene
Numerieke
Chmod ugo(+=-)rwx filename
Chmod 764 filename
File ownerschip wat t e doen
Chown (root/user) filename
Chgrp
3 types help command
Whatis command
Command –help
Man command
Adding text to files
Vi
Redirect
Echo redirect
Verwijderen van files en folders
Rmdir map/name
Rm
rm -r files en niet lege folders
Redirects types
Output > of»_space;
Input <
Noem de file management commands
Cp file-name
Rm
Mv
Mkdir
Rmdir. Rm -r
Chown
Chgrp
File display commands
Cat
More
Less
Head
Tail
Text proccesing command
cut
awk
grep egrep
sort -u
wc
sed
cut command
- cut –c1 filename
- cut –c1,2,4 filename
- cut –c1-3 filename
- cut –c1-3,6-8 filename
- cut –b1-3 filename
- cut -d: -f 6 /etc/passwd
list first 6th column separated by :
awk command
*awk ‘{print $1}’ file
*ls –l | awk ‘{print$1,$3, $NF}’
*awk ‘/Jerry/ {print}’ file
*awk -F: ‘{print $1}’ /etc/passwd
*echo “Hello Tom”|awk ‘{$2=”Adam”; print $0}‘
*cat file | awk ‘{$2=“Imran”; print $0}‘
*awk ‘length($0) > 15‘ file
grep of egrep command
grep –i KEYword file
*grep –n keyword file
*grep –v keyword file
*grep keyword file | awk ‘{print $1}’
*ls –l | grep Desktop
*egrep –i “keyword|keyword2” file= Search for 2 keywords.
sort command
sort file
*sort –r file
*sort –k2 file
sort -u
wc command
wc file
*wc –l file
*wc –w file
*wc –b file
compress a file and un-compress
tar cvf filename tar xvf filename
gzip
gunzip