managing files and directories

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/30

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:08 AM on 6/30/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

31 Terms

1
New cards

Create files with content

Echo “content” > file.txt

2
New cards

Create parent directory structure

Mkdir -p

3
New cards

Remove empty directories

Rmdir

4
New cards

Copy entire directories with their contents

Cp -r

5
New cards

Rename a file

Mv

6
New cards

Rename a file without overwriting

Mv -I

7
New cards

List all file names ending in .txt

Ls *.txt

8
New cards

List all names starting with photo

Ls photo*

9
New cards

list all .txt files according to one specific character

ls file?.txt

10
New cards

list .txt files according to a specific range of characters

ls file[a-z].txt

11
New cards

root directory

/

12
New cards

move up two directories

cd ../../

13
New cards

change directory to a path containing spaces

cd “path”

14
New cards

link two files together by the data in it

ln file1 file2

15
New cards

link two files based on name (symbolic links)

ln -s original_file symbolic_file

16
New cards

create an archive

tar -cf

17
New cards

extract an archive

tar -xf

18
New cards

archive with compression

tar -czf

19
New cards

extract compressed archives

tar -xzf

20
New cards

list archive contents without extracting

tar -tzf

21
New cards

individual file compression

gzip

22
New cards

individual file decompression

gunzip

23
New cards

echo “Hello, world!” ? greeting .txt

cat greeting.txt

output: Hello, World!

>

24
New cards

how to add output to an existing file instead of overwriting

>>

25
New cards

piping commands

command1 | command2

26
New cards

count words in a file

cat file.txt | wc -l

27
New cards

search for specific text and count matches

grep “error” log.txt | wc -l

28
New cards

view long output page by page

ls -la | less

29
New cards

discard outputls

ls > /dev/null

30
New cards

save and display output simultaneously

echo “output” | tee log.txt

31
New cards

save and display another output simultaneously without overwriting the original

echo “output2” | tee -a log.txt