On 22 Oct 2007 01:30:57 +0200, Artur Grabowski [EMAIL PROTECTED] wrote:
Tom Van Looy [EMAIL PROTECTED] writes:
on unix everything is a file?
s/unix/Plan 9/g
http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs
no, it's not. It's the dumbed down truth so that you can explain to
random people
Tom Van Looy [EMAIL PROTECTED] writes:
on unix everything is a file?
no, it's not. It's the dumbed down truth so that you can explain to
random people what the hell Unix is, or rather to make them have a
dumb look on their face and nod.
A process is not a file, a memory region is not a file,
On 20/10/2007, Aaron W. Hsu [EMAIL PROTECTED] wrote:
From: Tom Van Looy [EMAIL PROTECTED]
Date: Fri, 19 Oct 2007 20:21:56 +
Subject: Re: cp(1) bug ?
it shall do nothing more with source_file and shall go on to any
remaining files.
Doesn't this mean that cp should not do anything
on unix everything is a file?
- Oorspronkelijk bericht -
Van: Ted Unangst [mailto:[EMAIL PROTECTED]
Verzonden: zaterdag, oktober 20, 2007 01:18 AM
Aan: 'Aaron W. Hsu'
CC: [EMAIL PROTECTED], misc@openbsd.org
Onderwerp: Re: cp(1) bug ?
On 10/19/07, Aaron W. Hsu [EMAIL PROTECTED] wrote
On Sat, 20 Oct 2007 09:59:26 +, Tom Van Looy wrote:
on unix everything is a file?
Always has been.
At least as far back as I can remember - about early 1978.
Probably always will.
And, given the thread running here, my second edition of the Unix
Programmers Manual vol 1 from those days
, oktober 20, 2007 01:18 AM
| Aan: 'Aaron W. Hsu'
| CC: [EMAIL PROTECTED], misc@openbsd.org
| Onderwerp: Re: cp(1) bug ?
|
| On 10/19/07, Aaron W. Hsu [EMAIL PROTECTED] wrote:
| From: Tom Van Looy [EMAIL PROTECTED]
| Date: Fri, 19 Oct 2007 20:21:56 +
| Subject: Re: cp(1) bug
PROTECTED], misc@openbsd.org
Onderwerp: Re: cp(1) bug ?
On 10/19/07, Aaron W. Hsu [EMAIL PROTECTED] wrote:
From: Tom Van Looy [EMAIL PROTECTED]
Date: Fri, 19 Oct 2007 20:21:56 +
Subject: Re: cp(1) bug ?
it shall do nothing more with source_file and shall go on to any
remaining files
On 10/18/07, Richard Toohey [EMAIL PROTECTED] wrote:
# diff -u /tmp/cp.c cp.c
--- /tmp/cp.c Thu Oct 18 21:50:07 2007
+++ cp.cThu Oct 18 22:48:37 2007
@@ -237,6 +237,10 @@
*/
type = FILE_TO_DIR;
+ if (type == FILE_TO_DIR)
+ if
On 10/19/07, Gregg Reynolds [EMAIL PROTECTED] wrote:
On 10/19/07, Ted Unangst [EMAIL PROTECTED] wrote:
no, because that section is talking about files, not directories.
A directory is a kind of file:
file
An object that can be written to, or read from, or both. A file has
certain
On Thu, Oct 18, 2007 at 10:06:42PM +1300, Richard Toohey wrote:
This looks like fun ... 8-) And this is open source, so let's follow
the code and learn something as we go along ...
But first, I guess it IS following your instructions ...
You asked it to copy what's in directory foo,
On 19/10/2007, at 8:12 PM, Raimo Niskanen wrote:
On Thu, Oct 18, 2007 at 10:06:42PM +1300, Richard Toohey wrote:
JUST FOR FUN I have tried to fix this. What I know about C code
can be written on the back of a postage stamp
Did I mention the SIZE of the postage stamp? It's rather small ...
Em Sex, 2007-10-19 C s 13:52 -0400, Douglas A. Tutty escreveu:
On Fri, Oct 19, 2007 at 09:19:21AM -0400, Nick Guenther wrote:
On 10/19/07, Tom Van Looy [EMAIL PROTECTED] wrote:
Richard Toohey wrote:
On 19/10/2007, at 8:12 PM, Raimo Niskanen wrote:
Looks like OpenBSD, FreeBSD, and
Hello,
On Fri, Oct 19, 2007 at 07:59:38PM +0200, ropers wrote:
[...]
pdksh on Linux behaves just like bash on Linux, and unlike pdksh on OpenBSD.
I didn't expect that. So does that error message depend on OS APIs
rather than the shell program and its built-in commands?
cp is part of the
On 19/10/2007, ropers [EMAIL PROTECTED] wrote:
I beat you to trying it on Linux
No I didn't. Others beat me and you to it. Apologies for the unnecessary noise.
(...)
IMHO cp behaving like this is somewhat nicer than its current
behaviour on apparently most or all BSD OSes.
I'm surprised
On 10/19/07, Rimi Bougard [EMAIL PROTECTED] wrote:
Hello,
On Fri, Oct 19, 2007 at 07:59:38PM +0200, ropers wrote:
[...]
pdksh on Linux behaves just like bash on Linux, and unlike pdksh on
OpenBSD.
I didn't expect that. So does that error message depend on OS APIs
rather than the shell
I read that single unix specification thing again because the OpenBSD cp
manpage says it is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
quote
For each source_file, the following steps shall be taken:
1) If source_file references the same file as dest_file, cp may write a
On 19/10/2007, ropers [EMAIL PROTECTED] wrote:
I'm surprised now.
I just thought that what I wrote above was stupid, because I thought
that the behaviour of cp was a function of the shell built-in command
cp, not of the OS.
To confirm this, I installed the OpenBSD default shell pdksh on
On 10/19/07, Aaron W. Hsu [EMAIL PROTECTED] wrote:
From: Tom Van Looy [EMAIL PROTECTED]
Date: Fri, 19 Oct 2007 20:21:56 +
Subject: Re: cp(1) bug ?
it shall do nothing more with source_file and shall go on to any
remaining files.
Doesn't this mean that cp should not do anything
On 10/19/07, Ted Unangst [EMAIL PROTECTED] wrote:
On 10/19/07, Aaron W. Hsu [EMAIL PROTECTED] wrote:
From: Tom Van Looy [EMAIL PROTECTED]
Date: Fri, 19 Oct 2007 20:21:56 +
Subject: Re: cp(1) bug ?
it shall do nothing more with source_file and shall go on to any
remaining
On 19/10/2007, Andreas Kahari [EMAIL PROTECTED] wrote:
On 19/10/2007, ropers [EMAIL PROTECTED] wrote:
IMHO cp behaving like this is somewhat nicer than its current
behaviour on apparently most or all BSD OSes. Then again, I STILL
can't code, so I've no right to complain. ;o)
Really?
Date: Fri, 19 Oct 2007 20:12:26 +0200
From: Paul de Weerd [EMAIL PROTECTED]
Subject: Re: : cp(1) bug ?
On Fri, Oct 19, 2007 at 01:52:03PM -0400, Douglas A. Tutty wrote:
| Conceptually, though, why can't cp look at the source directory and take a
| snapshot, a to-do-list, of everything
On 10/19/07, Nick Guenther [EMAIL PROTECTED] wrote:
On 10/19/07, Paul de Weerd [EMAIL PROTECTED] wrote:
On Fri, Oct 19, 2007 at 01:52:03PM -0400, Douglas A. Tutty wrote:
| Conceptually, though, why can't cp look at the source directory and take a
| snapshot, a to-do-list, of everything it
On 10/19/07, Paul de Weerd [EMAIL PROTECTED] wrote:
On Fri, Oct 19, 2007 at 01:52:03PM -0400, Douglas A. Tutty wrote:
| Conceptually, though, why can't cp look at the source directory and take a
| snapshot, a to-do-list, of everything it has to copy, then do it? That
| way, any recursion
On Fri, Oct 19, 2007 at 09:19:21AM -0400, Nick Guenther wrote:
On 10/19/07, Tom Van Looy [EMAIL PROTECTED] wrote:
Richard Toohey wrote:
On 19/10/2007, at 8:12 PM, Raimo Niskanen wrote:
Looks like OpenBSD, FreeBSD, and Mac OS X BSD bits have the same
sort of outcome.
Copy foo
On Fri, Oct 19, 2007 at 09:19:21AM -0400, Nick Guenther wrote:
On 10/19/07, Tom Van Looy [EMAIL PROTECTED] wrote:
[...]
Anyway, it has worked like that since years, and I guess nobody has had
a problem with it before. I don't think it should be changed just
because some bored guy playing
ps: it was a ;-p
Nick Guenther wrote:
On 10/19/07, Tom Van Looy [EMAIL PROTECTED] wrote:
Richard Toohey wrote:
On 19/10/2007, at 8:12 PM, Raimo Niskanen wrote:
Looks like OpenBSD, FreeBSD, and Mac OS X BSD bits have the same
sort of outcome.
Copy foo to foo only once and quit, I think
From: Tom Van Looy [EMAIL PROTECTED]
Date: Fri, 19 Oct 2007 20:21:56 +
Subject: Re: cp(1) bug ?
it shall do nothing more with source_file and shall go on to any
remaining files.
Doesn't this mean that cp should not do anything when, for example, the
following command is run?
$ cp
cp on linux is part of gnu coreutils (http://www.gnu.org/software/coreutils/)
the error can be found in /coreutils-6.9/tests/cp/into-self
So it is not a part of bash or ksh (also on OpenBSD it is not part of the
shell, the code is in /usr/src/bin/cp/).
I beat you to trying it on Linux
No I
On Fri, Oct 19, 2007 at 01:52:03PM -0400, Douglas A. Tutty wrote:
| Conceptually, though, why can't cp look at the source directory and take a
| snapshot, a to-do-list, of everything it has to copy, then do it? That
| way, any recursion would be completed before the target directory
| appeared in
On 10/19/07, Tom Van Looy [EMAIL PROTECTED] wrote:
Richard Toohey wrote:
On 19/10/2007, at 8:12 PM, Raimo Niskanen wrote:
Looks like OpenBSD, FreeBSD, and Mac OS X BSD bits have the same
sort of outcome.
Copy foo to foo only once and quit, I think that's the correct
behaviour. I
On Debian, you also end up with a directory structure consisting of
one new 'foo' directory within the original 'foo' directory, which is
contradicting the message about not being able to copy foo into
itself...
$ mkdir foo
$ touch foo/bar
$ cp -R foo foo
cp: cannot copy a directory, `foo', into
On the October 17, at 10:39 (-0700), Bryan Irvine wrote:
[...]
looks like a feature to me. ;)
Agreed, although it does not seem to exists on GNU/Linux since GNU's cp
is different from BSD's. The feature is present on {Net,Open,Free}BSD.
It's not that a big deal, is it? Eventually, the
On 19/10/2007, Edd Barrett [EMAIL PROTECTED] wrote:
On 18/10/2007, Richard Toohey [EMAIL PROTECTED] wrote:
$ mkdir foo
$ cp -R foo foo
Ill try this on a solaris box and a linix box tomorrow at work :P
I beat you to trying it on Linux (Ubuntu Gutsy Gibbon 7.10):
[EMAIL PROTECTED]:~$
penguin's behaviour:
elachistos| cp -R foo foo
cp: cannot copy a directory, `foo', into itself, `foo/foo'
:)
2007/10/19, Arnaud Berthomier [EMAIL PROTECTED]:
On the October 17, at 10:39 (-0700), Bryan Irvine wrote:
[...]
looks like a feature to me. ;)
Agreed, although it does not seem
correction: hard links are not allowed on directory's, ...
that being said, comparing inodes seems the best solution
only, don't give an error but copy once
maybe if I have time this weekend I'll try code that behaviour
Anyway, it has worked like that since years, and I guess nobody has had
a
This looks like fun ... 8-) And this is open source, so let's follow
the code and learn something as we go along ...
But first, I guess it IS following your instructions ...
You asked it to copy what's in directory foo, recursively. And you
are changing what's in foo at the same time ...
1.
On 2007 Oct 18, at 4:40 PM, Edd Barrett wrote:
On 18/10/2007, Richard Toohey [EMAIL PROTECTED] wrote:
$ mkdir foo
$ cp -R foo foo
Ill try this on a solaris box and a linix box tomorrow at work :P
Mac OS X 10.4 behaves exactly the same way as OpenBSD does.
Cheers,
b
[demime 1.01d
On 10/18/07, Edd Barrett [EMAIL PROTECTED] wrote:
On 18/10/2007, Richard Toohey [EMAIL PROTECTED] wrote:
$ mkdir foo
$ cp -R foo foo
Ill try this on a solaris box and a linix box tomorrow at work :P
For what's it's worth, this is what OS X decides:
Axkbk:~ kousu$ mkdir test
Axkbk:~
On 18/10/2007, Richard Toohey [EMAIL PROTECTED] wrote:
$ mkdir foo
$ cp -R foo foo
Ill try this on a solaris box and a linix box tomorrow at work :P
--
Best Regards
Edd
---
http://students.dec.bournemouth.ac.uk/ebarrett
Hello everyboddy,
I have a (probably) stupid question... Please forgive me if she really is.
I discovered today a strange thing:
$ mkdir foo
$ cp -R foo foo
I was waiting something like cannot copy a directory into himself or
something like that but in fact this command create a (infinite ?
On 10/17/07, Rimi Bougard [EMAIL PROTECTED] wrote:
Hello everyboddy,
I have a (probably) stupid question... Please forgive me if she really
is.
I discovered today a strange thing:
$ mkdir foo
$ cp -R foo foo
I was waiting something like cannot copy a directory into himself or
41 matches
Mail list logo