1/30
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Create files with content
Echo “content” > file.txt
Create parent directory structure
Mkdir -p
Remove empty directories
Rmdir
Copy entire directories with their contents
Cp -r
Rename a file
Mv
Rename a file without overwriting
Mv -I
List all file names ending in .txt
Ls *.txt
List all names starting with photo
Ls photo*
list all .txt files according to one specific character
ls file?.txt
list .txt files according to a specific range of characters
ls file[a-z].txt
root directory
/
move up two directories
cd ../../
change directory to a path containing spaces
cd “path”
link two files together by the data in it
ln file1 file2
link two files based on name (symbolic links)
ln -s original_file symbolic_file
create an archive
tar -cf
extract an archive
tar -xf
archive with compression
tar -czf
extract compressed archives
tar -xzf
list archive contents without extracting
tar -tzf
individual file compression
gzip
individual file decompression
gunzip
echo “Hello, world!” ? greeting .txt
cat greeting.txt
output: Hello, World!
>
how to add output to an existing file instead of overwriting
>>
piping commands
command1 | command2
count words in a file
cat file.txt | wc -l
search for specific text and count matches
grep “error” log.txt | wc -l
view long output page by page
ls -la | less
discard outputls
ls > /dev/null
save and display output simultaneously
echo “output” | tee log.txt
save and display another output simultaneously without overwriting the original
echo “output2” | tee -a log.txt