RM(1) Käyttäjän sovellukset RM(1)

rm - remove files or directories

rm [VALITSIN]... [TIEDOSTO]...

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.

Poista (irrota linkitys) TIEDOSTO(t).

-f, --force
älä huomioi puuttuvia tiedostoja, älä kysy mitään
-i
kysy ennen jokaista poistoa
-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]
kehottaa sen mukaan, MILLOIN: ei koskaan, kerran (-I) tai aina (-i); ilman MILLOIN:a, kehota aina
--one-file-system
järjestelmä, kun poistat hierarkian rekursiivisesti, ohita hakemisto, joka on tiedostojärjestelmässä, joka ei ole vastaavan komentoriviargumentin argumentti
--no-preserve-root
älä kohtele juurta (”/”) erityisesti
--preserve-root[=all]
do not remove '/' (default); with 'all', reject any command line argument on a separate device from its parent
-r, -R, --recursive
poista hakemistojen sisältö rekursiivisesti
-d, --dir
remove empty directories
-v, --verbose
selitä mitä tapahtuu
--help
näytä tämä ohje ja poistu
--version
näytä versiotiedot ja poistu

Oletusarvon mukaan rm ei poista kansioita. Käytä --recursive (-r tai -R) -vaihtoehto poistaa myös kaikki luetellut kansiot ja kaikki sen sisältö.

Any attempt to remove a file whose last file name component is '.' or '..' is rejected with a diagnostic.

Tiedoston, jonka nimi alkaa merkillä ”-”, esim. ”-foo”, voi poistaa seuraavilla komennoilla:

rm -- -foo
rm ./-foo

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 unrecoverable, consider using shred(1).

Kirjoittaneet Paul Rubin, David MacKenzie, Richard M. Stallman ja Jim Meyering.

Ilmoita ohjelmistovioista (englanniksi) osoitteeseen bug-coreutils@gnu.org
GNU coreutils-kotisivu: https://www.gnu.org/software/coreutils/
Yleisohjeita GNU-ohjelmistojen käyttöön: https://www.gnu.org/gethelp/
Ilmoita käännösvirheistä osoitteeseen https://translationproject.org/team/fi.html

Copyright © 2026 Free Software Foundation, Inc. Lisenssi GPLv3+: GNU GPL versio 3 tai myöhempi https://gnu.org/licenses/gpl.html.
Tämä on vapaa ohjelmisto; sitä saa vapaasti muuttaa ja levittää edelleen. Siinä määrin kuin laki sallii, TAKUUTA EI OLE.

unlink(1), unlink(2), chattr(1), shred(1)

Koko dokumentaatio: https://www.gnu.org/software/coreutils/rm
tai saatavilla paikallisesti: info '(coreutils) rm invocation'

Tämän käsikirjan suomenkielisen käännöksen tekivät Ville Karjalainen <duet@sci.fi>

Tämä käännös on ilmainen dokumentaatio; katso tekijänoikeusehdot GNU General Public License -versiosta 3 tai uudemmasta. Emme ota vastuuta.

April 2026 GNU coreutils 9.11