Woah...! Vänta lite nu... !!! Du bra gissar på random linuxcomands utan att ha helt klart för dig vad dom gör! För att ta bort en fil så räcker det med "rm [path]" vill du ta bort innehållet i en mapp och dess undermappar så är det "rm -r [path]" som du ska använda. Skillnaden mellan "rm -r [path]" och "rm -rf [path] är att -f flaggan inte frågar "är du säker på att..."
Ta reda på vad linuxkomandon gör innan ni använder dem! Skillnaden på till exempel "rm -fr [path]test/*" och "rm -fr [path]test/.*" är väldigt liten men resultatet blir helt olika i det senare fallet kommer man ta bort alla filer i den mapp som mappen "test" ligger i! Alltså inte bara mappen som heter test!
Utdrag från manualen "man rm":
Kod:
-f Attempt to remove the files without prompting for confirma-
tion, regardless of the file's permissions. If the file does
not exist, do not display a diagnostic message or modify the
exit status to reflect an error. The -f option overrides any
previous -i options.
Kod:
-R Attempt to remove the file hierarchy rooted in each file
argument. The -R option implies the -d option. If the -i
option is specified, the user is prompted for confirmation
before each directory's contents are processed (as well as
before the attempt is made to remove the directory). If the
user does not respond affirmatively, the file hierarchy
rooted in that directory is skipped.
Note: -R och -r är samma sak
googla "dangerous linux commands" och tänk er för 2 ggr innan ni ctrl-c ctrl-v något från ett forum.