- Delete files and folders
- To send a file to the trash:
- Permanently delete a file
- To permanently delete a file:
- Удаление файлов и папок
- Чтобы отправить файл в корзину:
- Окончательное удаление файла
- Чтобы окончательно удалить файл:
- Linux ubuntu delete file
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- AUTHOR
- REPORTING BUGS
- COPYRIGHT
- SEE ALSO
- Introduction
- Commands for deleting files
- Options
- Precautions
- See Also
Delete files and folders
If you do not want a file or folder any more, you can delete it. When you delete an item it is moved to the Trash , where it is stored until you empty the trash. You can restore items in the Trash to their original location if you decide you need them, or if they were accidentally deleted.
To send a file to the trash:
- Select the item you want to place in the trash by clicking it once.
- Press Delete on your keyboard. Alternatively, drag the item to the Trash in the sidebar.
The file will be moved to the trash, and you’ll be presented with an option to Undo the deletion. The Undo button will appear for a few seconds. If you select Undo , the file will be restored to its original location.
To delete files permanently, and free up disk space on your computer, you need to empty the trash. To empty the trash, right-click Trash in the sidebar and select Empty Trash .
Permanently delete a file
You can immediately delete a file permanently, without having to send it to the trash first.
To permanently delete a file:
- Select the item you want to delete.
- Press and hold the Shift key, then press the Delete key on your keyboard.
- Because you cannot undo this, you will be asked to confirm that you want to delete the file or folder.
Deleted files on a removable device may not be visible on other operating systems, such Windows or Mac OS. The files are still there, and will be available when you plug the device back into your computer.
Удаление файлов и папок
Если файл или папка больше не нужны, можно удалить их. При удалении объект отправляется в Корзину , где будет хранится, пока вы не очистите корзину. Можно восстановить объекты из Корзины в их исходное местоположение, если вы всё же решите, что они нужны, или если они были удалены случайно.
Чтобы отправить файл в корзину:
- Выберите объект, который хотите поместить в корзину, нажав на него.
- Нажмите клавишу Delete . Вы также можете перетащить объект в Корзину в боковой панели.
Файл будет отправлен в корзину. После этого на несколько секунд появится кнопка Отменить . Если вы нажмёте на эту кнопку, то файл будет восстановлен и перемещён в исходное местоположение.
Чтобы окончательно удалить файлы и освободить место, занимаемое ими на компьютере, нужно очистить корзину. Для этого нажмите правой кнопкой на значок Корзина в боковой панели и выберите Очистить корзину .
Окончательное удаление файла
Можно окончательно удалить файл сразу же, не отправляя его сначала в корзину.
Чтобы окончательно удалить файл:
- Выберите объект, который нужно удалить.
- Удерживая нажатой клавишу Shift , нажмите Delete на клавиатуре.
- Поскольку отменить это действие невозможно, вам будет предложено подтвердить, действительно ли вы хотите удалить файл или папку.
Удалённые файлы на съёмных носителях могут быть не видны в других операционных системах, таких как Windows или Mac OS. Тем не менее, файлы никуда не исчезают с носителя и снова будут доступны при повторном подключении носителя к вашему компьютеру.
Linux ubuntu delete file
NAME
rm - remove files or directories
SYNOPSIS
DESCRIPTION
This manual page documents the GNU version of rm. rm removes each specified file. By default, it does not remove directories. If the -I or --interactive=once option is given, and there are more than three files or the -r, -R, or --recursive are given, then rm prompts the user for whether to proceed with the entire operation. If the response is not affirmative, the entire command is aborted. Otherwise, if a file is unwritable, standard input is a terminal, and the -f or --force option is not given, or the -i or --interactive=always option is given, rm prompts the user for whether to remove the file. If the response is not affirmative, the file is skipped.
OPTIONS
Remove (unlink) the FILE(s). -f, --force ignore nonexistent files and arguments, never prompt -i prompt before every removal -I prompt once before removing more than three files, or when removing recursively. Less intrusive than -i, while still giving protection against most mistakes --interactive[=WHEN] prompt according to WHEN: never, once (-I), or always (-i). Without WHEN, prompt always --one-file-system when removing a hierarchy recursively, skip any directory that is on a file system different from that of the corresponding command line argument --no-preserve-root do not treat '/' specially --preserve-root do not remove '/' (default) -r, -R, --recursive remove directories and their contents recursively -d, --dir remove empty directories -v, --verbose explain what is being done --help display this help and exit --version output version information and exit By default, rm does not remove directories. Use the --recursive (-r or -R) option to remove each listed directory, too, along with all of its contents. To remove a file whose name starts with a '-', for example '-foo', use one of these commands: rm -- -foo rm ./-foo Note that if you use rm to remove a file, it might be possible to recover some of its contents, given sufficient expertise and/or time. For greater assurance that the contents are truly unrecoverable, consider using shred.
AUTHOR
Written by Paul Rubin, David MacKenzie, Richard M. Stallman, and Jim Meyering.
REPORTING BUGS
Report rm bugs to bug-coreutils@gnu.org GNU coreutils home page: http://www.gnu.org/software/coreutils/> General help using GNU software: http://www.gnu.org/gethelp/> Report rm translation bugs to http://translationproject.org/team/>
COPYRIGHT
Copyright © 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
unlink(1), unlink(2), chattr(1), shred(1) The full documentation for rm is maintained as a Texinfo manual. If the info and rm programs are properly installed at your site, the command info coreutils 'rm invocation' should give you access to the complete manual.
© 2019 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.
Introduction
This page describes how to delete files through terminal.
It is possible, though difficult, to recover files deleted through rm. See DataRecovery. If you want to permanently delete a file use shred.
Commands for deleting files
The terminal command for deleting file(s) is rm. The general format of this command is rm [-f|i|I|q|R|r|v] file.
rm removes a file if you specify a correct path for it and if you don’t, then it displays an error message and move on to the next file. Sometimes you may not have the write permissions for a file, in that case it asks you for confirmation. Type yes if you want to delete it.
Options
- -f — deletes read-only files immediately without any confirmation.If both -f and -i are used then the one which appears last in the terminal is used by rm.
- -i — prompts for confirmation before deleting every file beforing entering a sub-directory if used with -R or -r. If both -f and -i are used then the one which appears last in the terminal is used by rm.
- -q — suppresses all the warning messages however error messages are still displayed. However the exit status is modified in case of any errors.
- -R — means delete recursively and is used to delete the directory tree starting at the directory specified i.e. it deletes the specified directory along with its sub-directory and files.
- -r — same as -R.
- -v — displays the file names on the output as they are being processed.
- -I — prompts everytime when an attempt is made to delete for than 3 files at a time or while removing recursively.
Precautions
These precautions are to help you avoid dangerous commands. You should not execute them!
- Never type sudo rm -R / or sudo rm -r / as it deletes all the data in the root directory and will delete the data of all the mounted volumes until you want to wipe of everything from your system.
- sudo rm -f /* also does blunders with your system.
See Also
DeletingFiles (последним исправлял пользователь ckimes 2017-09-03 16:40:24)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details