cli prompts

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

1/28

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:40 AM on 1/24/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

29 Terms

1
New cards

cd

change directory

2
New cards

pwd

print working director

3
New cards

ls

lists the files in current directory

4
New cards

ls -a

lists all files including hidden files in current directory

5
New cards

ls subdir/

lists content within a subdirectory

6
New cards

cd ..

moves one directory up

7
New cards

clear

clears terminal workspace

8
New cards

less file.txt

used to print the text of a file one screen at a time

9
New cards

cat file.txt

displays contents onto terminal window

10
New cards

grep “word” file.txt

used to find a word in a file (case-sensitive)

11
New cards

grep -i “word” file.txt

used to find a word in a file (non-case sensitive)

12
New cards

grep “word” *.txt

searches for word in all files in working directory

13
New cards

mkdir

creates a new directory

14
New cards

rm file.txt

removes a file

15
New cards

rm -r directory_name

removes the entire directory

16
New cards

mv old_name.txt. new_name.txt

renames a file

17
New cards

mv file.txt thisdir

moves the file to a directory

18
New cards

cp file.txt copy.txt

copies one file to the next

19
New cards

cp -r og_dir copy_dir

recursively copies a directory into the destination directory

20
New cards

cp -r og_dir* copy_dir

recursively copies the contents of a directory into the destination directory

21
New cards

find .

recursively prints all files and directories in the current directory

22
New cards

find . -name “*.txt”

finds a specific type of file in a directory

23
New cards

find / -name “file.txt”

finds the specific file starting from the root directory

24
New cards

exit

closes session

25
New cards

rm -i —recursive dir_name

deleting non-empty directories safely

26
New cards

..

parent directory

27
New cards

.

refers to self directory

28
New cards

absolute path

starts with / to reference root directory

29
New cards

cd

shortcut to change to home directory