Computer Science, asked by Anonymous, 10 months ago

Write the commands of Linux.
1) To create a directry. 2) To create an empty file.
3) To delete a file.
4) To delete a directry

Answers

Answered by cskooo7
3

Answer:

How to Remove Files

To remove (or delete) a file in Linux from the command line, use either the rm (remove) or unlink command.

The unlink command allows you to remove only a single file, while with rm you can remove multiple files at once.

Be extra careful when removing files or directories, because once the file is deleted, it cannot be easily recovered.

To delete a single file, use the rm or unlink command followed by the file name:

unlink filenamerm filename

If the file is write-protected, you will be prompted for confirmation, as shown below. To remove the file type y and hit Enter. Otherwise, if the file is not write-protected, it will be deleted without prompting.

rm: remove write-protected regular empty file 'filename'?

To delete multiple files at once, use the rm command followed by the file names separated by space.

rm filename1 filename2 filename3

You can also use a wildcard (*) and regular expansions to match multiple files. For example, to remove all .pdf files in the current directory, use the following command:

rm *.pdf

When using regular expansions, first list the files with the ls command so that you can see what files will be deleted before running the rm command.

Use the rm with the -i option to confirm each file before deleting it:

rm -i filename(s)

To remove files without prompting even if the files are write-protected pass the -f (force) option to the rm command:

rm -f filename(s)

You can also combine rm options. For example, to remove all .txt files in the current directory without a prompt in verbose mode, use the following command:

rm -fv *.txt

pls pls mark it as brainlest answer

your actions may help me.....

Answered by ItzAditt007
3

{\huge{\pink{\underline{\underline{\purple{\mathbb{\bold{\mathcal{AnSwEr..}}}}}}}}}

These commands should be written in terminal emulator:-

1) Command : mkdir.

2) Command : touch.

3) Command : rm.

4) Command : rmdir.

Similar questions