pwd
cd .. #change to superior directory cd #change to home cd - #change to last directory cd /abc #change to abc directory
ls #list all -a #show also hidden files -l #show more details -t #sort by modifications time
file abc #filetype
mkdir abc #create directory mkdir abc abc2 #create two directories
rmdir abc #remove directory rm abc #remove file rm -f *.txt #remove all textfiles without confirmation rm -rf #remove all files and subfiles and directories
cp cp -R #Recursiv with subfiles and directories cp -R abc /targetdirectory cp *.txt /targetdirectory
mv abc.txt ~/abc #move file to directory mv -f #overwrite files without confirmation
cat abc.txt #show content of file more abc.txt #show content with pagination less abc.txt #show pagination with go back cat abc.txt | less #pipe commands
cat abc1 abc2 > abc12 #combine two files in one new files cat *txt | less #Show content of all files
wc -c -l -w #Symbols, lines, words wc -l *.txt #Show linecount wc *.txt #Count of lines, words, symbols
fgrep #search exact grep #search pattern fgrep kitty *.txt #search kitty in txt files -i -l -L- V #small/big letters, only name of files, name files without hit, show lines without hit grep -i '^abc.*[0-9].*,m$' *.txt #search begin of all files with start "abc", minimum 1 number and end with m grep 'A.*Miau' /abc/kitty #search lines start with A and end with Miau grep 'Kit[td]y' /abc/kitty #search lines contain Kitty or Kitdy egrep -l 'Kitty|Miau' *.txt #search all textfiles containing Kitty or Miau grep --ignore-case --line-number theword abc.csv > output.txt #save result in file
find ~/abc -name kitty.txt #search file find ~/abc -name kitty.* -o -name miau.* #search kitty or miau files
zip kitty.zip abc1 abc2
zip both files in kitty.zip
zip -r kitty.zip abc
zip directory abc
unzip -v kitty.zip
list files in zip files
unzip kitty.zip
unzip it