commands Flashcards

(35 cards)

1
Q

What does the command echo “HELLO -START OF EXECUTION OF LINUX/UNIX COMMANDS” do?

A

Prints the message to the terminal.

Marks the start of the command execution session.

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

How does the command PS1=”\d \t \u@\h \#\$” customize the shell prompt?

A

Displays current date, time, username, hostname, command number, and prompt symbol.

Provides a more informative prompt.

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

What is the purpose of the command pwd?

A

Prints the current working directory.

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

What does the command ls do?

A

Lists files and directories in the current directory.

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

What information does ls -la provide?

A

Lists all files/directories with detailed information.

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

What does uname -r display?

A

The Linux kernel version.

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

What is the output of uname -a?

A

Shows all system information.

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

What does the command cat palindrome.c do?

A

Displays the contents of the file palindrome.c.

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

What is the purpose of the command cp sum_avgl.c sa_list.c?

A

Copies sum_avgl.c to a new file sa_list.c.

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

What does the command mkdir sphal accomplish?

A

Creates a directory named sphal.

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

What does cd sphal do?

A

Changes the current directory to sphal.

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

What is the purpose of the command mv f2.c f4.c?

A

Renames f2.c to f4.c.

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

What does the command rm f5.c do?

A

Deletes the file f5.c.

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

What does chmod 777 palindrome.c grant?

A

Full permissions to all users for palindrome.c.

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

What does the command cat sum_avgl.c key_search.c > progall.c do?

A

Combines contents of two files into progall.c.

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

What does more progall.c accomplish?

A

Displays progall.c page by page.

17
Q

What is the function of the command wc progall.c?

A

Counts lines, words, and characters in progall.c.

18
Q

What does the command find / -name passwd do?

A

Searches the entire filesystem for files named passwd.

19
Q

What does grep “stdio” progall.c search for?

A

Searches for the string ‘stdio’ in progall.c.

20
Q

What information does df -h provide?

A

Displays disk space usage in human-readable format.

21
Q

What does the command who do?

A

Lists logged-in users.

22
Q

What is the purpose of cat >> myteamlist?

A

Appends team member details to myteamlist.

23
Q

What does sort myteamlist accomplish?

A

Sorts myteamlist alphabetically.

24
Q

What does cat /proc/cpuinfo > infocpu do?

A

Saves CPU information to infocpu.

25
What does the command `history` do?
Lists the command history.
26
Fill in the blank: The command `touch emptyfile` creates an _______.
empty file named `emptyfile`.
27
True or False: `tail -10 progall.c` displays the first 10 lines of `progall.c`.
False.
28
What does `tail -5 infocpu` display?
Displays the last 5 lines of `infocpu`.
29
What does `echo $PATH | more` do?
Displays the `PATH` environment variable paginated.
30
What is the purpose of `head -1 progall.c`?
Shows the first line of `progall.c`.
31
What does `cd ..` accomplish?
Moves to the parent directory.
32
What information does `ps -la` provide?
Lists all processes with detailed information.
33
What does the command `cal` do?
Shows the current month's calendar.
34
What does `sort -r myteamlist` do?
Sorts `myteamlist` in reverse order.
35
What does `echo “END OF SP LAB ASSIGNMENT 1 - GOOD BYE”` signify?
Marks the end of the session.