[lug] cp and rm
David
dajo at frii.com
Tue Jul 31 16:01:55 MDT 2001
Is anyone having trouble with cp and/or rm under RH7.1(KRUD)? I have
scripts that have worked forever that now do not. The problem (with
both rm and cp) appears as though they have been set with xx='xx -i'.
And this state persists despite all the counter measures that I can
think of. I.e., unalias xx, alias xx=xx, using the -f option, using
the --remove-destination option (cp), etc. When I am copying hundreds
of files I prefer not to have to answer a prompt for each file 8-)
Also, I just did a df and found that (my bash function) has mounted my
archive directory ten times (presumably I have run the function ten
times, and I have been aborting with C-c); is that normal? I recall a
"xxxx already mounted" kind of message from the past.
Rednose root ~ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hda5 466668 57695 384878 14% /
/dev/hda6 632444 848 599468 1% /tmp
/dev/hda7 466668 45138 397435 11% /var
/dev/hda9 2925300 1242552 1534152 45% /usr
/dev/hda10 790556 106944 643452 15% /usr/src
/dev/hda11 3162420 326760 2675012 11% /usr/local
/dev/hda12 9875100 1408696 7964776 16% /home
/dev/hdc7 466668 57695 384878 14% /Archive2
/dev/hdc7 466668 57695 384878 14% /Archive2
/dev/hdc7 466668 57695 384878 14% /Archive2
/dev/hdc7 466668 57695 384878 14% /Archive2
/dev/hdc7 466668 57695 384878 14% /Archive2
/dev/hdc7 466668 57695 384878 14% /Archive2
/dev/hdc7 466668 57695 384878 14% /Archive2
/dev/hdc7 466668 57695 384878 14% /Archive2
/dev/hdc7 466668 57695 384878 14% /Archive2
/dev/hdc7 466668 57695 384878 14% /Archive2
dajo
These are the functions that have worked in the past.
##############################################################################
# #
# .bashrc - root configuration file for Bash shell. #
# #
# Hacked-up by dajo #
# -last-modification-date "Tue Jul 31 15:40:10 2001" #
# #
##############################################################################
source /home/dajo/.bashrc
alias emacs="/usr/local/bin/emacs -q -l /root/.emacs -g 159x69+130+20 &"
# FVWM2 seems to require this so that it can overwrite initialisation files.
unset noclobber
# Necessary for some operations, e.g., make install for emacs.
PATH=$PATH:/sbin
# Tool.
tarandgzip ()
# parameter 1 is the name of the file to be created.
# parameter 2 is the directory to be processed.
{
echo "starting tarandgzip"
date
echo "tarring $1"
rm -f $1
tar -cf $1 $2
echo "gzipping $1"
gzip $1
date
echo "completed tarandgzip"
}
# Archive.
backuphome ()
{
echo "archive commencing"
mount /Archive2
echo "copying to Archive2"
cp -af /home/bozo /Archive2/home/.
cp -af /home/dajo /Archive2/home/.
cp -af /home/Nepenthes /Archive2/home/.
cp -af /home/NewSystemFiles /Archive2/home/.
cp -af /home/Releases /Archive2/home/.
tarandgzip /Archive2/dajotar /home/dajo
tarandgzip /Archive2/neptar /home/Nepenthes
umount /Archive2
echo "archive complete"
}
More information about the LUG
mailing list