CONTENT
  • CHANGES
Szukaj
counter

#top rm

[<<]|[<]|[^]|[v]|[>]|[>>]|[Zwiń]|[#top]|[X]

rm - remove files or directories

Powiązane:
cp, cpio, mv, rm, rsync,

#top SYNOPSIS

SYNOPSIS
rm [OPTION]... FILE...

#top DESCRIPTION

DESCRIPTION



#top OPTIONS

OPTIONS
Remove (unlink) the FILE(s).

-d, --directory
unlink FILE, even if it is a non-empty directory (super-user only; this works only if your system

supports 'unlink' for nonempty directories)

-f, --force
ignore nonexistent files, never prompt

-i, --interactive
prompt before any removal

--no-preserve-root
do not treat '/' specially (the default)

--preserve-root
fail to operate recursively on '/'

-r, -R, --recursive
remove directories and their contents recursively

-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 is usually possible to recover the contents of that file. If you want more assurance that the contents are truly unrecoverable, consider using shred.



#top EXAMPLES


EXAMPLES
rm -rf /path/to/dir
rm -f /path/to/file

Kolejność opcji ma znaczenie:
-f, --force - ignore nonexistent files, never prompt
-i, --interactive - prompt before any removal

Usuwa bez wyświetlania zapytań o potwierdzenie operacji:
mkdir test
touch test/plik1
touch test/plik2
# remove without interactive
rm -i -rf test

Przed usunięciem wyświetlania monit o potwierdzenie operacji:
mkdir test
touch test/plik1
touch test/plik2
# remove with interactive, prompt for every removed file
rm -rf -i test




Zmodyfikowany ostatnio: 2014/05/20 20:46:18 (9 lat temu), textsize: 2,79 kB, htmlsize: 5,56 kB

Zapraszam do komentowania, zgłaszania sugestii, propozycji, własnych przykładów, ...
Dodaj komentarzKomentarze użytkowników