Читать книгу Linux Bible - Christopher Negus - Страница 138

CAUTION

Оглавление

When you override the -i option on the mv, cp, and rm commands, you risk removing some (or lots) of files by mistake. Using wildcards (such as *) and no -i makes mistakes even more likely. That said, sometimes you don't want to be bothered to step through each file you delete. You have other options as follows:

 As noted with the -f option, you can force rm to delete without prompting. An alternative is to run rm, cp, or mv with a backslash in front of it (\rm bigdir). The backslash causes any command to run unaliased.

 Another alternative with mv is to use the -b option. With -b, if a file of the same name exists at the destination, a backup copy of the old file is made before the new file is moved there.

Linux Bible

Подняться наверх