python exam 2025

0.0(0)
studied byStudied by 1 person
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/48

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

49 Terms

1
New cards

Which Linux command to go from a folder to another

cd

2
New cards

Which Linux command leads to the root directory

cd /

3
New cards

Which Linux command leads to the home / standard directory

cd ~

4
New cards

Which Linux command leads to the above directory

cd ..

5
New cards

Which Linux command to display the content of the current folder

ls

6
New cards

How to list all pdf files of the current directory

ls *.pdf

7
New cards

Which option to also display the hidden files

ls -a

8
New cards

Which Linux command should be used to remove a file

rm

9
New cards

Which Linux command should be used to remove an empty directory

rmdir

10
New cards

Which Linux command should be used to remove a non-empty directory

rm -r

11
New cards

Which Linux command can be used to copy a file

cp

12
New cards

What does the argument -r mean in the command rm -r

recursive (directory + contents)

13
New cards

What Linux command is used to move a file to another directory

mv

14
New cards

Which Linux command to know the current path

pwd

15
New cards

What is echo used for in bash (what is it’s equivalent in Python)

echo "text" (Python: print())

16
New cards

Which Linux command to download a page from the internet

wget (or curl -O )

17
New cards

What is Linux

an open-source Unix-like operating system (OS)

18
New cards

What are Vim nano and emacs

terminal text editors

19
New cards

What is the command chown used for

change file owner and group: chown :

20
New cards

What is the command chmod used for

change permissions

21
New cards

Which keyboard shortcut is used to interrupt a process

Ctrl + C

22
New cards

Which commands or options can display a commander helper note

man or --help

23
New cards

How to exit a command manual

q

24
New cards

What is contained in the variable PATH

directories where the shell looks for executables: echo $PATH

25
New cards

What is the use of the symbol >

redirection (overwrite): cmd > file

26
New cards

What is the use of the symbol >>

redirection (append): cmd >> file

27
New cards

What is the use of the symbol | (vertical bar)

pipe: cmd1 | cmd2

28
New cards

What are the 3 main operating systems

Windows / macOS / Linux

29
New cards

How to execute a shell script named script.sh

bash script.sh or ./script.sh

30
New cards

Which Linux command to research some text in a file

grep "text" file

31
New cards

Which option should be used with this command to research a pattern in the file

grep -E "pattern" file

32
New cards

Which language is activated with this option : grep -E "PATTERN" fichier

Extended Regular Expressions (ERE)

33
New cards

Which option should be added to extract only the matched text rather than the whole paragraph

grep -o "pattern" file

34
New cards

Which first git command to use to register untracked and modified files

git add . (or git add )

35
New cards

Which git command to use when a file is in the stage zone to make a backup of it

git commit -m "message"

36
New cards

Which git command to change the repository state to the previous commit

git reset --hard HEAD~1

37
New cards

Which git command to change the repository state 5 commits back

git reset --hard HEAD~5

38
New cards

Which git command to change the repository state to the last / current commit

git reset --hard HEAD

39
New cards

What are the three commands that are used to save changes in the local repository for an unstaged file

git add . then git commit -m "msg" then git push

40
New cards

What is git

a version control system (VCS)

41
New cards

What is github

a web platform for hosting Git repositories

42
New cards

apt is a command to

manage software packages

43
New cards

sudo commands enable you to

run a command with administrator (root) privileges

44
New cards

crontab is used to

schedule commands to run automatically at specific times

45
New cards

in linux path variable contains

a list of directories (folders), separated by deux points

46
New cards

le trait penché sert à

The root directory ( the top of the file system tree)

47
New cards

hat was the command cat used for in class?

display the content of a file in a terminal

48
New cards

Write a shorter pattern that would extract the same word machine from machine. The pattern should not contain the word machine

<p></p>
49
New cards

Write a pattern that could extract all the words: html and machine and html

knowt flashcard image