... and firstly happy new year !
I found something strange tonight. i'll try to be clear :
I have 2 partitions from the same disk mounted
/dev/sda3 on /home/ryo type ext3 (rw,commit=0) /dev/sda4 on /media/HDD1 type ext3 (rw,nosuid,nodev,data=ordered,user=ryo)
i switched the "data" option to ordered ( from data=writeback ) to test the "strange thing" but it did not helped.
The case :
i have an alias to backup some config files
alias backup_fvwm="tar cfvz /media/HDD1/gentoo/fichiers/FVWM/Fvwm-ryo-$(date +%d%m%y_%H%M).tgz ~/.fvwm/"
which give me a tarball with date in title
When i execute the command in $HOME dir, the tarball contains the "right" title.
If i execute the alias
AND IF i have executed this command some minutes ago, the tarball is not renamed, but is touched :
ryo@RyoBox /media/HDD1/gentoo/fichiers/FVWM $ ls -l total 0 ryo@RyoBox /media/HDD1/gentoo/fichiers/FVWM $ backup_fvwm && ls -l (... tarball creation ) -rw-r--r-- 1 ryo users 194836 9 janv. 00:11 Fvwm-ryo-080113_23H33.tgz
notice the time and date in title ? a previous backup
It gives me some headaches and drives me crazy.
While i was writing i executed a few commands , 1 new tarball finally appeared, and then the previous one is touched at each command :
-rw-r--r-- 1 ryo users 194870 9 janv. 00:22 Fvwm-ryo-080113_23H33.tgz -rw-r--r-- 1 ryo users 194870 9 janv. 00:19 Fvwm-ryo-090113_00H14.tgz
in facts, the "touched" tarball is good, the files inside are updated.
i'm still digging, if anyone got some infos , please share
Linux RyoBox 3.7.0-gentoo #1 SMP PREEMPT Mon Dec 17 22:30:05 CET 2012 x86_64 Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz GenuineIntel GNU/Linux
LABEL="HOME" /home/ryo ext3 auto 0 2 LABEL="HDD1" /media/HDD1 ext3 auto,rw,user,exec,data=ordered 0 2
-rw-r--r-- 1 ryo users 194870 9 janv. 00:29 Fvwm-ryo-080113_23H33.tgz
1 hour older than its name , wtf ...
Last edited by ryo (2013-01-10 13:10:50)
What makes me wonder: $(date +%d%m%y_%H%M) should give something like "100113_1219" (at 12:19 o'clock on Jan 10 2013), not "100113_12H19"; notice the "H" between hour and minute?
Is it possible that your alias overlaps with another or such?
Try to execute "alias backup_fvwm" to have the mapping printed before executing it and check if it the alias you planned to exec.
Also, please logout from the System completely and re-login to make sure you reset the environment for your shell.
What makes me wonder: $(date +%d%m%y_%H%M) should give something like "100113_1219" (at 12:19 o'clock on Jan 10 2013), not "100113_12H19"; notice the "H" between hour and minute
You have an eagle eye !
That 's a mistake because i edited 2 or 3 times my post and once deleted the second "H" , i thought i made an error.
The real alias is
alias backup_fvwm="tar cfvz /media/HDD1/gentoo/fichiers/FVWM/Fvwm-ryo-$(date +%d%m%y_%HH%M).tgz ~/.fvwm/"
Thank you very much for your hints.
I was not aware about calling alias in a term.
The alias command is parsed on login or when we source it , but substitutions seems to be done only once.
This is why the date stay the same. I also tried
alias backup_fvwm="tar cfvz /media/HDD1/gentoo/fichiers/FVWM/Fvwm-ryo-`date +%d%m%y_%HH%M`.tgz ~/.fvwm/"
But it 's the same result.
I thought it was about latency in ext3 , i was too far away ^^
I know where to dig now , thank you
Last edited by ryo (2013-01-10 13:09:49)