Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

File is not shown with Finder or "ls *" command but is shown with "ls filename"

MacBook Pro (Retina, 13-inch, Mid 2014)

10.10.3 (14D136)


Step 1. Clone linux repository to a external disk (3TB, HFS+ filesystem)

cd /Volumes/My Book/Downloads/git-home/
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

I found cscope can't deal with the path name contains space, so I tried to clone it to my home directory.


Step 2. Clone above repository to internal disk(256G SSD, HFS+ filesystem)

cd ~/git-home
git clone /Volumes/My Book/Downloads/git-home/linux-stable

Now, strange things happened in this new repository (/Users/socrates/git-home/linux-stable). There are some files are changed...

[socrates:linux-stable](master)$ git status

On branch master

Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:

(use "git add <file>..." to update what will be committed)

(use "git checkout -- <file>..." to discard changes in working directory)



modified: include/uapi/linux/netfilter/xt_connmark.h

modified: include/uapi/linux/netfilter/xt_dscp.h

modified: include/uapi/linux/netfilter/xt_mark.h

modified: include/uapi/linux/netfilter/xt_rateest.h

modified: include/uapi/linux/netfilter/xt_tcpmss.h

modified: include/uapi/linux/netfilter_ipv4/ipt_ecn.h

modified: include/uapi/linux/netfilter_ipv4/ipt_ttl.h

modified: include/uapi/linux/netfilter_ipv6/ip6t_hl.h

modified: net/netfilter/xt_TCPMSS.c

modified: net/netfilter/xt_dscp.c

modified: net/netfilter/xt_hl.c

modified: net/netfilter/xt_rateest.c



no changes added to commit (use "git add" and/or "git commit -a")

I have tried to "git checkout -f", "git reset --hard", "git clean -fd", "git gc", "git fsck" and "Verify Disk via Disk Utility"(There is no error in my both disks) , but all failed

[socrates:linux-stable](master)$ git checkout -f

Your branch is up-to-date with 'origin/master'.

[socrates:linux-stable](master)$ git status

On branch master

Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:

(use "git add <file>..." to update what will be committed)

(use "git checkout -- <file>..." to discard changes in working directory)



modified: include/uapi/linux/netfilter/xt_CONNMARK.h

modified: include/uapi/linux/netfilter/xt_DSCP.h

modified: include/uapi/linux/netfilter/xt_MARK.h

modified: include/uapi/linux/netfilter/xt_RATEEST.h

modified: include/uapi/linux/netfilter/xt_TCPMSS.h

modified: include/uapi/linux/netfilter_ipv4/ipt_ECN.h

modified: include/uapi/linux/netfilter_ipv4/ipt_TTL.h

modified: include/uapi/linux/netfilter_ipv6/ip6t_HL.h

modified: net/netfilter/xt_DSCP.c

modified: net/netfilter/xt_HL.c

modified: net/netfilter/xt_RATEEST.c

modified: net/netfilter/xt_tcpmss.c



no changes added to commit (use "git add" and/or "git commit -a")


Step 3. Try to access one file has been modified without unknown reason

cd include/uapi/linux/netfilter/

[socrates:netfilter](master)$ ls -l xt_C*

-rw-r--r-- 1 socrates staff 500 May 9 00:50 xt_CHECKSUM.h

-rw-r--r-- 1 socrates staff 154 May 9 00:50 xt_CLASSIFY.h

-rw-r--r-- 1 socrates staff 238 May 9 00:50 xt_CONNSECMARK.h

-rw-r--r-- 1 socrates staff 625 May 9 00:50 xt_CT.h

[socrates:netfilter](master)$ ls -l xt_CONNMARK.h

-rw-r--r-- 1 socrates staff 691 May 9 11:48 xt_CONNMARK.h

[socrates:netfilter](master)$ file xt_CONNMARK.h

xt_CONNMARK.h: ASCII c program text

[socrates:netfilter](master)$ stat xt_CONNMARK.h

16777218 18619326 -rw-r--r-- 1 socrates staff 0 691 "May 9 11:57:13 2015" "May 9 11:48:29 2015" "May 9 11:48:29 2015" "May 9 11:48:29 2015" 4096 8 0 xt_CONNMARK.h

[socrates:netfilter](master)$ cat xt_CONNMARK.h

#ifndef _XT_CONNMARK_H

#define _XT_CONNMARK_H



#include <linux/types.h>



/* Copyright (C) 2002,2004 MARA Systems AB <http://www.marasystems.com>

* by Henrik Nordstrom <hno@marasystems.com>

*

* This program is free software; you can redistribute it and/or modify

* it under the terms of the GNU General Public License as published by

* the Free Software Foundation; either version 2 of the License, or

* (at your option) any later version.

*/



enum {

XT_CONNMARK_SET = 0,

XT_CONNMARK_SAVE,

XT_CONNMARK_RESTORE

};



struct xt_connmark_tginfo1 {

__u32 ctmark, ctmask, nfmask;

__u8 mode;

};



struct xt_connmark_mtinfo1 {

__u32 mark, mask;

__u8 invert;

};



#endif /*_XT_CONNMARK_H*/

Above commands that the file does exist in filesystem but can not be accessed without knowing its filename.

The other files as modified in "git status" have the same situation.


The workaround is to copy file one by one from original repository and replace the bad one.

However, the problem is still happened with copying entire directory to internal disk:

cp -r /Volumes/My Book/Downloads/git-home/linux-stable ~/git-home/


So I think it could be a serious problem of HFS+ filesystem.

Does anyone have suggestion that I can narrow down the cause of the problem?

MacBook Pro with Retina display, OS X Yosemite (10.10.3)

Posted on May 8, 2015 9:13 PM

Reply
Question marked as Best reply

Posted on May 9, 2015 7:47 PM

Hello socrates.wei,

The HFS+ file system is not case sensitive, so files like xt_dscp.h and xt_DSCP.h that are found in the same directory will certainly cause problems.

2 replies

May 9, 2015 8:06 PM in response to etresoft

Hi etresoft,


Oh... It's true...

The filesystem of internal SSD is "Mac OS Extended(Journaled)", the other one is "Mac OS Extended(Case-sensitive, Journaled)".

I never thought about that case-insensitive could be a problem due to I was living in a case-sensitive world (Ext2/3/4) 😝


BTW, I found a related post by the keywords: "git clone case-sensitive mac"

http://javigon.com/2013/09/04/non-case-sensitive-mac-os-extended-colliding-with- git-clone/

and a workaround at

http://source.android.com/source/initializing.html#creating-a-case-sensitive-dis k-image


Thanks for your helpful explanation!

File is not shown with Finder or "ls *" command but is shown with "ls filename"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.