UNIX Basics 2 Flashcards

1
Q

What does the date command do?

A

Displays the current date and time

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

What does the cal command do?

A

The calendar command displays the current month.

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

What does the du command do?

A

Prints the number of disk blocks -512 byte units, being used by the contents of the current directory.

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

What does the sort command do?

A

Sorts the input according to the given option.

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

What does the cut command do?

A

Extracts columns out of text files.

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

What does the tar command do?

A

Bundles files into an archive.

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

What does the diff command do?

A

Finds the differences between 2 files.

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

What does the grep command do?

A

Search for information using regular expressions.

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

What does the&raquo_space; vs the > do?

A

> prints the output into a file, while&raquo_space; appends the output into a file.

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

What is a pipe?

A

This will bring unix commands together.

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

What does date +%Y-%m-%d print?

A

2024-11-23

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

What does date +%j print?

A

The number of days since January 1st.

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

What does date +%s print?

A

The Unix timestamp.

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

What does cal -n numberOfMonths print?

A

The first month plus however many months.

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

What does cal -w print?

A

Displays the week number.

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

What does cal -j print.

A

Displaying the day numbers.

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

What does du COP3363 print?

A

Prints the disk usage of the entered directory.

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

What does du -h print?

A

Prints the disk usage in human readable form.

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

What does du -s print?

A

Prints a grand summary of the disk space used.

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

What does du -a do?

A

Prints the disk usage of all files and subdirectories in the current directory.

21
Q

What does du -c print?

A

Prints a grand total for each file.

22
Q

What was head -n __ print?

A

Prints the first blank number of lines instead of the first ten.

23
Q

What does head -c __ print?

A

Prints the first blank number of bytes.

24
Q

Does tail share the same options meanings?

25
What does tail -h print?
Watches for changes in the file (for logging).
26
What does the cut -c print?
Cuts each line of the file from start position to end position.
27
What does cut -b print?
Cuts by bytes instead of characters.
28
What does cut -f fieldNumbers -d delimiters print?
Separates the lines into fields based off the delimiters then prints the significant fields.
29
What does cut [options] --complement filename print?
Prints the complement - the parts of the files that would have been left out in the original cut command.
30
What does cut [options] --output-delimiter new dl filename print?
Changes the output delimiter from space to the given delimiter
31
What does sort -r fileName print?
Sorts in reverse order.
32
What does sort -n fileName print?
Sorts numerical content as numbers instead of lexicographical order.
33
What does Dort -f fileName print?
Ignores the case while sorting.
34
What does sore -c fileName print?
Checks if a file is already sorted. Prints the lines that are not in order. The file is already sorted if there is no output.
35
What does sort -u fileName print?
Sorts the file contents and removes the duplicates.
36
What does tar -c print?
insert files into a tar file?
37
What does tar -f print?
Uses the name of the tar file that is specified.
38
What does tar -v print?
Outputs the name of each file as it is inserted into or extracted from a tar file.
39
What does tar -x print?
Extracts the files from a tar file.
40
What does tar -t print?
Lists contents of an archive.
41
What does tar -z print?
gzip/gunzip if necessary.
42
What does the diff -b print?
Treat groups of spaces as one.
43
What does diff -i print?
ignores case
44
What does tar -r print?
Includes directories in comparison.
45
What does diff -w do?
Ignores all spaces and tabs.
46
What does grep -i do?
Ignores case.
47
what does grep -n print?
Displays line numbers.
48
What does grep -l print?
Displays only the names of the files and note the actual lines.
49
What does grep -P do?
Pattern is a Perl regular expression, not a Unix regular expression.