Portál AbcLinuxu, 30. dubna 2025 12:47
rm (GNU coreutils) 7.6
** Improvements rm: rewrite to use gnulib's fts This makes rm -rf significantly faster (400-500%) in some pathological cases, and slightly slower (20%) in at least one pathological case. rm -r deletes deep hierarchies more efficiently. Before, execution time was quadratic in the depth of the hierarchy, now it is merely linear. However, this improvement is not as pronounced as might be expected for very deep trees, because prior to this change, for any relative name length longer than 8KiB, rm -r would sacrifice official conformance to avoid the disproportionate quadratic performance penalty. Leading to another improvement: rm -r is now slightly more standards-conformant when operating on write-protected files with relative names longer than 8KiB.Ono totiz uz selze inicilalizace fts (inicializace souboru pro smazani). Predtim se soubory neinicializovali najednou (nepouzivalo se fts) a chyba se preskocila (ted selze inicializace jako celek). By me zajimalo jak to hodlaj resit, az se nekdo ozve.
-f
?
# rm --version | head -1 rm (GNU coreutils) 8.1 # touch -f a b c; rm a b "" c; ls rm: invalid argument: `' a b c #
# touch a b c; rm -f a b "" c; ls rm: invalid argument: `' a b c
Odpověď si můžeme přečíst v rm(1p):
For each file the following steps shall be taken: 1. If the file does not exist: a. If the -f option is not specified, rm shall write a diagnostic message to standard error. b. Go on to any remaining files.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.