Знайомство з терміналом
Navigating Files and Directories
Figure 1
Image 1 of 1: ‘Файлова система складається з кореневого каталогу, який містить підкаталоги з назвами bin, data, users та tmp’
Figure 2
Image 1 of 1: ‘Як і інші каталоги, домашні каталоги є підкаталогами "/Users", наприклад "/Users/imhotep", "/Users/larry" або "/Users/nelle"’
Figure 3
Image 1 of 1: ‘A directory tree below the Users directory where "/Users" contains the directories "backup" and "thing"; "/Users/backup" contains "original","pnas_final" and "pnas_sub"; "/Users/thing" contains "backup"; and"/Users/thing/backup" contains "2012-12-01", "2013-01-08" and"2013-01-27"’
Figure 4
Image 1 of 1: ‘A directory tree below the Users directory where "/Users" contains the directories "backup" and "thing"; "/Users/backup" contains "original","pnas_final" and "pnas_sub"; "/Users/thing" contains "backup"; and"/Users/thing/backup" contains "2012-12-01", "2013-01-08" and"2013-01-27"’
Figure 5
Image 1 of 1: ‘Загальний синтаксис команди терміналу’
Робота з файлами та каталогами
Figure 1
Image 1 of 1: ‘screenshot of nano text editor in action with the text It's not publish or perish any more, it's share and thrive’
Pipes and Filters
Figure 1
Image 1 of 1: ‘Redirects and Pipes of different commands: "wc -l *.pdb" will direct theoutput to the shell. "wc -l *.pdb > lengths" will direct output to the file"lengths". "wc -l *.pdb | sort -n | head -n 1" will build a pipeline where theoutput of the "wc" command is the input to the "sort" command, the output ofthe "sort" command is the input to the "head" command and the output of the"head" command is directed to the shell’
Loops
Figure 1
Image 1 of 1: ‘The for loop "for filename in .dat; do echo cp $filename original-$filename;done" will successively assign the names of all ".dat" files in your currentdirectory to the variable "$filename" and then execute the command. With thefiles "basilisk.dat", "minotaur.dat" and "unicorn.dat" in the current directorythe loop will successively call the echo command three times and print threelines: "cp basislisk.dat original-basilisk.dat", then "cp minotaur.datoriginal-minotaur.dat" and finally "cp unicorn.datoriginal-unicorn.dat"’