File Management Flashcards

1
Q

What command is used to create an empty file?

A

touch <file></file>

The ‘touch’ command is commonly used in Unix/Linux systems.

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

Which command copies files or directories?

A

cp <source></source> <destination></destination>

The ‘cp’ command allows for copying files and directories from one location to another.

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

What command is used to move or rename files or directories?

A

mv <source></source> <destination></destination>

The ‘mv’ command can be used for both moving files and renaming them.

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

What command deletes a file?

A

rm <file></file>

The ‘rm’ command permanently removes files from the filesystem.

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

Which command displays the contents of a file?

A

cat <file></file>

The ‘cat’ command is used to concatenate and display file content in the terminal.

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

What command opens a file in the nano text editor?

A

nano <file></file>

‘nano’ is a simple text editor for Unix/Linux systems.

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

Fill in the blank: To write text to a file and overwrite its contents, use _______.

A

echo “text” > <file></file>

This command directs output to a file, replacing any existing content.

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

Fill in the blank: To append text to a file without overwriting, use _______.

A

echo “text”&raquo_space; <file></file>

The ‘»’ operator appends text to the end of a file.

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