File manipulation

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What will this option do: cp -i item1 item2

(-i = interactive) it will prompt the user with a confirmation before overwriting any existing files

What will this option do: cp -r item1 item2

(-r = recursive) it will recursively copy directories and their components

item1 is a directory and item2 is a non-existing directory. what will this command do: cp item1 item2

A directory called item2 will be created and it will have the same content as item1

item1 is a file and item2 is a non-existing directory. what will this command do: cp item1 item2

A file called item2 will be created and it will have the same content as item1. In other words, item2 will not be created as a directory as you expect

item1 is a directory and item2 is a existing directory. what will this command do: cp item1 item2

Directory item1 will be copied and become a subdirectory of directory item2

what will this command do: mv -i file1 file2

If file2 exists, the user will be prompted with with a confirmation before file2 is overwritten.

What does the cat command do?

It can display short texts from files, display what is being typed and join muliple files.

What happens if you use this command: rm * .html

It will delete everything because of the space between * and .html

file1 is an existing file and file2 is an existing file and dir1 is an existing directory what will this command do: mv file1 file2 dir1

It will move file1 and file2 into dir1

file1 is an existing file and file2 is an existing file and dir1 is a non-existing directory what will this command do: mv file1 file2 dir1

It will not work as you can not move files into non-existing directories

What is this command used for: cp

Its used to copy files or directories

what does the mv command do?

The mv command performs both file moving and file renaming, depending on how it is used. The original file will be deleted.

What does the rm command do?

The rm command is used to remove/delete files or directories

What does the command mkdir do?

This command allows us to create one or more directories

What happens if you use the mkdir command to make a directory that already existed?

You get a warning in the console

what does this command do: cat output.txt

display the text from output.txt

file1 is an existing file and file2 is a non-existing file what will this command do: mv file1 file2

file2 will be created with the same content as file1. File1 will be deleted. Basically just renaming

file1 is an existing file and file2 is an existing file what will this command do: mv file1 file2

file2 will be overwritten with the content from file1. file1 will be deleted.

item1 is a file, item2 is a file and directory1 is a directory what will this command do: cp item1 item2 directory1

it will copy both item1 and item2 into directory1

What will this command do: mkdir Books Pictures

it will create two directories, one called Books and another called Pictures

what does this command do: cat

it will display what is being typed on the keyboard

item1 is a file and item2 is a existing directory. what will this command do: cp item1 item2

item1 will be copied and stored in directory item2

item1 is a file and item2 is a non-existing file. what will this command do: cp item1 item2

item2 will be created and has the same content as item1.

item1 is a file and item2 is an existing file. what will this command do: cp item1 item2

item2 will be overwritten by the content of item1.

Which command lets you create directories?

mkdir

What command is used to move/rename a file or directory?

mv

What command is used to remove/delete files or dictionaries?

rm


Kaugnay na mga set ng pag-aaral

Ch. 43 Hematologic and Immunologic Dysfunction

View Set

Economics Guided Reading 2.2-2.3

View Set

Mitosis/Meiosis Lecture Quiz Ch 6+7

View Set