LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   USB memory, cd <dir> is ok, but ls cannot see. (https://www.linuxquestions.org/questions/linux-newbie-8/usb-memory-cd-dir-is-ok-but-ls-cannot-see-526082/)

kaz2100 02-06-2007 10:30 AM

USB memory, cd <dir> is ok, but ls cannot see.
 
Hi Penguins.

My penguin (Debian sarge) ran into this problem. In short, directory is not visible by ls, but can change into. This is on USB memory stick, which has fat16 filesystem.

Following is what happens:
Code:

/mnt/mem>ls -a | grep P
AppleShare PDS
PDPB.pdf
0 /mnt/mem>cd PP2
0 /mnt/mem/PP2>ls
f1    f2       
0 /mnt/mem/PP2>

PP2 directory is not seen by "ls", but cd PP2 works, and has correct files in it.

File system looks like
Code:

# fdisk -l /dev/sda

Disk /dev/sda: 1014 MB, 1014497280 bytes
17 heads, 32 sectors/track, 3642 cylinders
Units = cylinders of 544 * 512 = 278528 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1              1        3643      990703+  6  FAT16
#

For some reason, fsck goes with fat32 and detects no error.(even with -t fat16)
Code:

# fsck /dev/sda1
fsck 1.37 (21-Mar-2005)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/dev/sda1: 3111 files, 44938/61902 clusters
# fsck -t fat16 /dev/sda1
fsck 1.37 (21-Mar-2005)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
/dev/sda1: 3111 files, 44938/61902 clusters
#

The directory is seen on other machine (Macintosh).
How can I get straighten out?

Any idea will be appreciated.

Happy Penguins!

bobdevis 02-08-2007 01:47 AM

try "ls -sla". It shows you all the stuff.

wahming 02-08-2007 02:04 AM

ls -a, which is what he typed, will show you everything. Though not in this case, apparently


All times are GMT -5. The time now is 11:05 AM.