File Management Flashcards
What command is used to create an empty file?
touch <file></file>
The ‘touch’ command is commonly used in Unix/Linux systems.
Which command copies files or directories?
cp <source></source> <destination></destination>
The ‘cp’ command allows for copying files and directories from one location to another.
What command is used to move or rename files or directories?
mv <source></source> <destination></destination>
The ‘mv’ command can be used for both moving files and renaming them.
What command deletes a file?
rm <file></file>
The ‘rm’ command permanently removes files from the filesystem.
Which command displays the contents of a file?
cat <file></file>
The ‘cat’ command is used to concatenate and display file content in the terminal.
What command opens a file in the nano text editor?
nano <file></file>
‘nano’ is a simple text editor for Unix/Linux systems.
Fill in the blank: To write text to a file and overwrite its contents, use _______.
echo “text” > <file></file>
This command directs output to a file, replacing any existing content.
Fill in the blank: To append text to a file without overwriting, use _______.
echo “text”»_space; <file></file>
The ‘»’ operator appends text to the end of a file.