Portál AbcLinuxu, 30. prosince 2025 07:22
cp -p to zvladne z vfat na ext3 bez problemu, ale naopak se mi cas prepise
cp -p ctime opravdu meni, spletl jsem si to s mtimem :-/. Nicmene vfat mezi ctime a mtime rozlisuje (fctime, ctime, cdate, adate, mtime, mdate). Kdyz soubor zkopiruju pod Win XP, tak ctime i mtime zustanou zachovany (samozrejme i datumy), pod Linuxem bohuzel ani jeden (nebo aspon nevim jak na to).
static int vfat_build_slots(struct inode *dir, const unsigned char *name,
int len, int is_dir, int cluster,
struct timespec *ts,
struct msdos_dir_slot *slots, int *nr_slots)
{
/*…*/
fat_date_unix2dos(ts->tv_sec, &time, &date);
de->time = de->ctime = time;
de->date = de->cdate = de->adate = date;
/*…*/
}
. Problem byl v tom, ze mtime se modifikuje v pripade, kdyz soubor kopiruji uzivatelem s UID ruznym od UID vlastnika souboru pripojene vfat (i kdyz mam umask=000). Tohle samozrejme neplati pro roota.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.