Voting

: seven minus six?
(Example: nine)

The Note You're Voting On

pearcec at commnav dot com
24 years ago
If you rename one directory to another where the second directory exists as an empty directory it will not complain.

Not what I expected.

[pearcec@abe tmp]$ mkdir test1
[pearcec@abe tmp]$ mkdir test2
[pearcec@abe tmp]$ touch test1/test
[pearcec@abe tmp]$ php
<?php
rename
("test1","test2");
?>
X-Powered-By: PHP/4.0.5
Content-type: text/html

[pearcec@abe tmp]$ ls -al
total 12
drwxr-xr-x 3 pearcec commnav 4096 Jun 15 13:17 .
drwxr-xr-x 18 pearcec commnav 4096 Jun 15 13:15 ..
drwxr-xr-x 2 pearcec commnav 4096 Jun 15 13:16 test2
[pearcec@abe tmp]$ ls -la test2/
total 8
drwxr-xr-x 2 pearcec commnav 4096 Jun 15 13:16 .
drwxr-xr-x 3 pearcec commnav 4096 Jun 15 13:17 ..
-rw-r--r-- 1 pearcec commnav 0 Jun 15 13:16 test
[pearcec@abe tmp]$

<< Back to user notes page

To Top