fast backup file w/ bf() shell function.
This commit is contained in:
parent
0b689b1827
commit
c714789432
|
@ -204,6 +204,12 @@ DATE=$(/bin/date +%Y-%m-%d_%H:%M:%S.%N)
|
|||
local TMPFILE=tmp.${DATE}.sw
|
||||
mv "$1" $TMPFILE && mv "$2" "$1" && mv $TMPFILE $2
|
||||
}
|
||||
bf()
|
||||
{
|
||||
DATE=$(/bin/date +%Y-%m-%d_%H:%M:%S.%N)
|
||||
local TMPFILE=tmp.${DATE}.bak
|
||||
/bin/cp "$1" $TMPFILE
|
||||
}
|
||||
fi
|
||||
|
||||
#date() {
|
||||
|
|
Loading…
Reference in New Issue