
that `cp -f `is not working ???? it's asking me for 'overwrite' thx, L. -- ============================================================== Lieven Sterck, PhD Tel:+32 (0)9 3313821 Fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, UGent Bioinformatics and Evolutionary Genomics Division Technologiepark 927, B-9052 Gent, Belgium Email: lieven.sterck@psb.ugent.be Website: http://bioinformatics.psb.ugent.be -------------------------------------------------------------- Algal Genetics Group UMR 7139 CNRS-UPMC Végétaux Marins et Biomolécules (Marine Plants and Biomolecules) Station Biologique Place Georges Teissier, BP74 29682 Roscoff Cedex, France Website: http://www.sb-roscoff.fr/UMR7139/en/genetics.html ============================================================== "Facts are meaningless. You could use facts to prove anything that's even remotely true!" H. Simpson

security reasons? lieven sterck wrote:
that `cp -f `is not working ???? it's asking me for 'overwrite'
thx, L.
-- ================================================================== Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Evolutionary Genomics Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 fax:+32 (0)9 3313809 Website: http://bioinformatics.psb.ugent.be ==================================================================

First I thought cp would be aliased to 'cp -i' (interactive) but I don't find anything of such sort. The active aliasses are: [kebil@midas ~]$ alias l. ls -d .* --color=tty ll ls -l --color=tty ls ls --color=tty vi vim So, maybe you're trying to delete files from which you are not the owner (eventhough you own the directory)? Kenny On Wed, 20 Aug 2008, Sofie Van Landeghem wrote:
security reasons?
lieven sterck wrote:
that `cp -f `is not working ???? it's asking me for 'overwrite'
thx, L.
--

Kenny Billiau wrote:
First I thought cp would be aliased to 'cp -i' (interactive) but I don't find anything of such sort. The active aliasses are:
[kebil@midas ~]$ alias l. ls -d .* --color=tty ll ls -l --color=tty ls ls --color=tty vi vim
So, maybe you're trying to delete files from which you are not the owner (eventhough you own the directory)? No, I just created two test files and it had the same behaviour, asking it it could overwrite.
Kenny
On Wed, 20 Aug 2008, Sofie Van Landeghem wrote:
security reasons?
lieven sterck wrote:
that `cp -f `is not working ???? it's asking me for 'overwrite'
thx, L.
-- ================================================================== Sofie Van Landeghem PhD Student VIB Department of Plant Systems Biology, Ghent University Bioinformatics and Evolutionary Genomics Technologiepark 927, 9052 Gent, BELGIUM Tel: +32 (0)9 331 36 95 fax:+32 (0)9 3313809 Website: http://bioinformatics.psb.ugent.be ==================================================================

but apparently rm and mv are also aliased ... and they 'accept' -f ?? L. Sebastian Proost wrote:
Actually it seems cp is indeed aliased (well at least for me), type unalias cp to disable it (should be back when you logout/in)
Seb
[sepro@midas ~]$ alias InterPro /group/biocomp/projects/ost_ANNOTATION/FUNCT/GO_annotation/interpro/iprscan/InterProScan.pl )rtemis (java -Xmx200m -jar /nas/biocomp/users/strom/SOFT/artemis_v5.jar *cp cp -i* )ebug (perl -d:ptkdb )ir (ls -go --color l. ls -d .* --color=tty ll ls -l --color=tty ls ls --color=tty mv mv -i phd /usr/local/phd/phd.pl rm rm -i vi vim
Kenny Billiau wrote:
First I thought cp would be aliased to 'cp -i' (interactive) but I don't find anything of such sort. The active aliasses are:
[kebil@midas ~]$ alias l. ls -d .* --color=tty ll ls -l --color=tty ls ls --color=tty vi vim
So, maybe you're trying to delete files from which you are not the owner (eventhough you own the directory)?
Kenny
On Wed, 20 Aug 2008, Sofie Van Landeghem wrote:
security reasons?
lieven sterck wrote:
that `cp -f `is not working ???? it's asking me for 'overwrite'
thx, L.
-- ================================================================== Sebastian Proost PhD Student
Tel:+32 (0)9 331 36 92 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM sepro@psb.ugent.be http://www.psb.ugent.be ================================================================== "If I knew what I was doing, it wouldn't be called research." --Albert Einstein ------------------------------------------------------------------------
_______________________________________________ Binari Is Not About Reaching IT Binari@psb.ugent.be https://maillist.psb.ugent.be/mailman/listinfo/binari
-- ============================================================== Lieven Sterck, PhD Tel:+32 (0)9 3313821 Fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, UGent Bioinformatics and Evolutionary Genomics Division Technologiepark 927, B-9052 Gent, Belgium Email: lieven.sterck@psb.ugent.be Website: http://bioinformatics.psb.ugent.be -------------------------------------------------------------- Algal Genetics Group UMR 7139 CNRS-UPMC Végétaux Marins et Biomolécules (Marine Plants and Biomolecules) Station Biologique Place Georges Teissier, BP74 29682 Roscoff Cedex, France Website: http://www.sb-roscoff.fr/UMR7139/en/genetics.html ============================================================== "Facts are meaningless. You could use facts to prove anything that's even remotely true!" H. Simpson

I was thinking the same... I think that the -f option "overrides" the -i option with the rm and mv commands, but not the cp command for some reason. So it might be a bug (or a feature) in either the cp command or the rm and mv commands... or we are simply overlooking something. Anyone have any idea about the internal working of the cp command when overwriting files? Does it first remove the file (by removing the inode in the file system) or does it work in other mysterious ways? Michiel lieven sterck wrote:
but apparently rm and mv are also aliased ... and they 'accept' -f ??
L.
Sebastian Proost wrote:
Actually it seems cp is indeed aliased (well at least for me), type unalias cp to disable it (should be back when you logout/in)
Seb
[sepro@midas ~]$ alias InterPro /group/biocomp/projects/ost_ANNOTATION/FUNCT/GO_annotation/interpro/iprscan/InterProScan.pl )rtemis (java -Xmx200m -jar /nas/biocomp/users/strom/SOFT/artemis_v5.jar *cp cp -i* )ebug (perl -d:ptkdb )ir (ls -go --color l. ls -d .* --color=tty ll ls -l --color=tty ls ls --color=tty mv mv -i phd /usr/local/phd/phd.pl rm rm -i vi vim
Kenny Billiau wrote:
First I thought cp would be aliased to 'cp -i' (interactive) but I don't find anything of such sort. The active aliasses are:
[kebil@midas ~]$ alias l. ls -d .* --color=tty ll ls -l --color=tty ls ls --color=tty vi vim
So, maybe you're trying to delete files from which you are not the owner (eventhough you own the directory)?
Kenny
On Wed, 20 Aug 2008, Sofie Van Landeghem wrote:
security reasons?
lieven sterck wrote:
that `cp -f `is not working ???? it's asking me for 'overwrite'
thx, L.
-- ================================================================== Sebastian Proost PhD Student
Tel:+32 (0)9 331 36 92 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM sepro@psb.ugent.be http://www.psb.ugent.be ================================================================== "If I knew what I was doing, it wouldn't be called research." --Albert Einstein ------------------------------------------------------------------------
_______________________________________________ Binari Is Not About Reaching IT Binari@psb.ugent.be https://maillist.psb.ugent.be/mailman/listinfo/binari
-- ============================================================== Lieven Sterck, PhD
Tel:+32 (0)9 3313821 Fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, UGent Bioinformatics and Evolutionary Genomics Division Technologiepark 927, B-9052 Gent, Belgium Email: lieven.sterck@psb.ugent.be Website: http://bioinformatics.psb.ugent.be
-------------------------------------------------------------- Algal Genetics Group UMR 7139 CNRS-UPMC Végétaux Marins et Biomolécules (Marine Plants and Biomolecules) Station Biologique Place Georges Teissier, BP74 29682 Roscoff Cedex, France Website: http://www.sb-roscoff.fr/UMR7139/en/genetics.html ============================================================== "Facts are meaningless. You could use facts to prove anything that's even remotely true!" H. Simpson
------------------------------------------------------------------------
_______________________________________________ Binari Is Not About Reaching IT Binari@psb.ugent.be https://maillist.psb.ugent.be/mailman/listinfo/binari
-- ================================================================== Michiel Van Bel PhD student Tel:+32 (0)9 331 36 95 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM mibel@psb.ugent.be http://www.psb.ugent.be ==================================================================

btw, the man-page of cp is pretty weird... option -f/--force : if an existing destination file cannot be opened, remove it and try again why the hell would you want to open the destination file? I think the meaning of force is slightly different between cp and rm and mv... That seems a likely explanation at least. Anyway, the command "unalias cp" indeed allows you to copy without prompting. So i think it is rather a difference in word definitions than technical aspects. Michiel Michiel Van Bel wrote:
I was thinking the same... I think that the -f option "overrides" the -i option with the rm and mv commands, but not the cp command for some reason. So it might be a bug (or a feature) in either the cp command or the rm and mv commands... or we are simply overlooking something.
Anyone have any idea about the internal working of the cp command when overwriting files? Does it first remove the file (by removing the inode in the file system) or does it work in other mysterious ways?
Michiel
lieven sterck wrote:
but apparently rm and mv are also aliased ... and they 'accept' -f ??
L.
Sebastian Proost wrote:
Actually it seems cp is indeed aliased (well at least for me), type unalias cp to disable it (should be back when you logout/in)
Seb
[sepro@midas ~]$ alias InterPro /group/biocomp/projects/ost_ANNOTATION/FUNCT/GO_annotation/interpro/iprscan/InterProScan.pl
)rtemis (java -Xmx200m -jar /nas/biocomp/users/strom/SOFT/artemis_v5.jar *cp cp -i* )ebug (perl -d:ptkdb )ir (ls -go --color l. ls -d .* --color=tty ll ls -l --color=tty ls ls --color=tty mv mv -i phd /usr/local/phd/phd.pl rm rm -i vi vim
Kenny Billiau wrote:
First I thought cp would be aliased to 'cp -i' (interactive) but I don't find anything of such sort. The active aliasses are:
[kebil@midas ~]$ alias l. ls -d .* --color=tty ll ls -l --color=tty ls ls --color=tty vi vim
So, maybe you're trying to delete files from which you are not the owner (eventhough you own the directory)?
Kenny
On Wed, 20 Aug 2008, Sofie Van Landeghem wrote:
security reasons?
lieven sterck wrote:
that `cp -f `is not working ???? it's asking me for 'overwrite'
thx, L.
-- ================================================================== Sebastian Proost PhD Student
Tel:+32 (0)9 331 36 92 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM sepro@psb.ugent.be http://www.psb.ugent.be ================================================================== "If I knew what I was doing, it wouldn't be called research." --Albert Einstein ------------------------------------------------------------------------
_______________________________________________ Binari Is Not About Reaching IT Binari@psb.ugent.be https://maillist.psb.ugent.be/mailman/listinfo/binari
-- ============================================================== Lieven Sterck, PhD
Tel:+32 (0)9 3313821 Fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, UGent Bioinformatics and Evolutionary Genomics Division Technologiepark 927, B-9052 Gent, Belgium Email: lieven.sterck@psb.ugent.be Website: http://bioinformatics.psb.ugent.be
-------------------------------------------------------------- Algal Genetics Group UMR 7139 CNRS-UPMC Végétaux Marins et Biomolécules (Marine Plants and Biomolecules) Station Biologique Place Georges Teissier, BP74 29682 Roscoff Cedex, France Website: http://www.sb-roscoff.fr/UMR7139/en/genetics.html ============================================================== "Facts are meaningless. You could use facts to prove anything that's even remotely true!" H. Simpson
------------------------------------------------------------------------
_______________________________________________ Binari Is Not About Reaching IT Binari@psb.ugent.be https://maillist.psb.ugent.be/mailman/listinfo/binari
-- ================================================================== Michiel Van Bel PhD student Tel:+32 (0)9 331 36 95 fax:+32 (0)9 3313809 VIB Department of Plant Systems Biology, Ghent University Technologiepark 927, 9052 Gent, BELGIUM mibel@psb.ugent.be http://www.psb.ugent.be ==================================================================
participants (6)
-
Kenny Billiau
-
lieven sterck
-
Michiel Van Bel
-
Sebastian Proost
-
Sofie Van Landeghem
-
Thomas Abeel