tut 1 Flashcards

1
Q

man date

A

gives the access to information like the manual on how to obtain the dates and timings, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

date

A

mon 19 aug 2024 09:23:56 AM +08

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

date –help

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

clear

A

deletes everything

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

date +%R

A

09:29
provides 24hr time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

date +%x

A

19/08/2024

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

history

A

shows the history of the commands used

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

!5

A

uses the 5th command under the history list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

whoami

A

ubuntu
(shows the current log in user)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

sudo su -

A

switch to the privileged user/ system administrator

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

cat/ etc/passwd

A

contains the user name and info

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

cat/ etc/shadow

A

stores the info for the password of the file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what do you do if u want to access a file with a password as a system administrator?

A

sudo cat/ etc/shadow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

file/ etc/passwd

A

ASCII text
(Tells us what type of file it is)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

ls

A

lists down the directories and files in the current working directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

cd D

A

goes to the folder that starts with D

17
Q

cd Desktop/
ls

A

gives us all the files and types of files under the Desktop directory

18
Q

cd Desktop/
ls
file cat.jpg

A

gives us more information about the file named “cat.jpg”

19
Q

cat /etc/passwd
head/ etc/passwd

A

gives us all the info in the cat file.
shows us the first 10 lines

20
Q

cat /etc/passwd
head -5 / etc/passwd

A

shows us first 5 lines

21
Q

cat /etc/passwd
tail / etc/passwd

A

shows the last 10 lines

22
Q

cat /etc/passwd
tail -1 / etc/passwd

A

shows the last line

23
Q

cat /etc/passwd
wc /etc/passwd

A

51 90 3035
shows the number of character, words and lines

24
Q

man wc

A

manual

25
Q

wc -l /etc/passwd

A

shows the number of lines

26
Q

wc -w /etc/passwd

A

shows the number of words

27
Q

wc -c /etc/passwd

A

shows the number of characters

28
Q

ls

A

shows the file we are currently doing command on ??

29
Q

ls
ls -l

A

shows us more information about the file, when the file was created and the access settings to other users (tut 3)

30
Q

cd ~

A

standardizes our folders, brings us back to our home folder

31
Q

ls -la

A

shows all our hidden folder
starts with “.” is a hidden folder, for example ‘.bashrc’ is a hidden folder

32
Q

ip addr

A

gives us the internet address, etc