Using The Command Lines
Windows: Display File Contents
-
cat .\import_document.tsx -
more .\import_document.tsx -
Enter Key Advance the file by one line
-
Space Key Advances the file by one page
-
q Key Allows you to quit out of more and go back to your shell
-
cat fruits.txt -Head 10 -
cat fruits.txt -Tail 10
Linux: Display File Contents
-
cat import_document.txt -
less large_document.txt -
g Key Moves to the beginning of a file
-
G Key Moves to the end of a text file
-
/word_search Allows you to search for a word or phrase
-
q Key Allows you to quit out of more and go back to your shell
-
head fruits.txt -
tail fruits.txt
Windows: Modifying Text Files
start notepad++ hello.txt
Linux: Modifying Text Files
nano my_file
Windows Powershell
- Get-Help
- Get-Alias
- Get-ChildItem
Get-Alias lsGet-Helpis used for PowerShell commands likeGet-Help ls, and/?is used for other commands like dir such asdir /?
Windows: Searching Within Files
Ctrl + FIndexing option- Find Notepad++, press CTRL+SHIFT+F to open the Find Files dialog
slsselect-string cow farm_animals.txtselect-string cow *.txt
Windows: Searching Within Directories
ls 'C:Programs Files\' -Recursive -Filter *.exe- Filter Will filter the results for file names that match a pattern
Linux: Searching Within Files
grep cow farm_animals.txtselect-grep cow *_animals.txt
Windows: Input, Output, and Pipeline
cd 'C:\User\Cindy\desktopecho woof > dog.txt- Write-Output
- input/output streams
- stdin, stdout, stderr
cat .\dog.txtecho woofecho woof >> dog.txtcat dog.txtcat word.txtcat word.txt | Select-String stcat word.txt | Select-String st > st_words.txtcat st_words.txtrm secure_filerm secure_file > errors.txt1:stdout - the output1:stderr - the error$null- Get-Help
- about_redirection
Linux: Input, Output, and Pipeline
- stdin, stdout, stderr
echo woof > dog.txtcat dog.txtecho woof >> dog.txtcat dog.txtcat < file_input.txtcat file_input.txtls /dir/fake_dir 2 > error_output.txtcat error_output.txt/dev/nullless /var/log/syslog 2 > /dev/nullless -la /etc | grep bluetooth
Windows and Linux Advanced Navigation
- Regular Expression Used to help you do advanced pattern-based selection