State of directories with the same name

Doll, Margaret Ann margaret_doll at brown.edu
Wed Apr 24 13:15:01 UTC 2013


I am doing an "rsync" from one array to another.

I looked at the the files on the disk to which I am copying this morning.
"ls" showed three copies of some of the folders and one copy of others.
"ls -sal" showed that the three copies of a folder, seemed to have the same
contents.

I made a new directory newadmin, "cd"ed into the admin directory, "mv" all
the files in the admin directory to newadmin, "cd .." and did another
listing.  Now all the directories were there, but the duplicates were
gone.   Why did this happen?

nas-0-0 dist]# ls
admin       bco    cha       jad
admin       bco    class
admin       bco    class

ls -sal admin
total 4
0 drwxrwxrwx  4 nobody nobody   52 Dec 25  2011 .
4 drwxrwxrwx 34 root   root   4096 Apr 21 08:28 ..
0 drwxrwxrwx  3 nobody nobody   55 Sep 14  2007 atipa
0 drwxrwxrwx  2 nobody nobody   87 Oct 15  2007 export-restore
0 -rw-rw-rw-  1 nobody nobody    0 Sep 10  2007 ge.out
[root at nas-0-0 dist]# ls -sal admin*
admin:
total 4
0 drwxrwxrwx  4 nobody nobody   52 Dec 25  2011 .
4 drwxrwxrwx 34 root   root   4096 Apr 21 08:28 ..
0 drwxrwxrwx  3 nobody nobody   55 Sep 14  2007 atipa
0 drwxrwxrwx  2 nobody nobody   87 Oct 15  2007 export-restore
0 -rw-rw-rw-  1 nobody nobody    0 Sep 10  2007 ge.out
admin:
total 4
0 drwxrwxrwx  4 nobody nobody   52 Dec 25  2011 .
4 drwxrwxrwx 34 root   root   4096 Apr 21 08:28 ..
0 drwxrwxrwx  3 nobody nobody   55 Sep 14  2007 atipa
0 drwxrwxrwx  2 nobody nobody   87 Oct 15  2007 export-restore
0 -rw-rw-rw-  1 nobody nobody    0 Sep 10  2007 ge.out

[root at nas-0-0 dist]# cd admin
[root at nas-0-0 admin]# ls
atipa  export-restore  ge.out
[root at nas-0-0 admin]# cd ..
[root at nas-0-0 dist]# mkdir newadmin
[root at nas-0-0 dist]# cd admin
[root at nas-0-0 admin]# ls
atipa  export-restore  ge.out
[root at nas-0-0 admin]# mv * ../newadmin
[root at nas-0-0 admin]# ls
[root at nas-0-0 admin]# cd ..
[root at nas-0-0 dist]# ls -sal admin
total 4
0 drwxrwxrwx  2 nobody nobody    6 Apr 24 08:44 .
4 drwxrwxrwx 35 root   root   4096 Apr 24 08:44 ..

"ls" now shows the directories without duplications.

[root at nas-0-0 dist]# ls
admin      ...                 jad
      ...             cha        ...
bco    ...        class       ...



More information about the redhat-list mailing list