Find the answer to your Linux question:
Results 1 to 8 of 8
---------------------------------------------------------------------------------------------------------------------------------------- [root@localhost media]# ls UMESH [root@localhost media]# cd UMESH/ [root@localhost UMESH]# ll ls: cannot access ejb: Input/output error total 0 d????????? ? ? ? ? ? ejb [root@localhost UMESH]# rm ...
  1. #1
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    Problem deleting file on USB

    ----------------------------------------------------------------------------------------------------------------------------------------
    [root@localhost media]# ls
    UMESH
    [root@localhost media]# cd UMESH/
    [root@localhost UMESH]# ll
    ls: cannot access ejb: Input/output error
    total 0
    d????????? ? ? ? ? ? ejb
    [root@localhost UMESH]# rm -rf ejb
    rm: cannot remove `ejb': Input/output error
    [root@localhost UMESH]# ll
    ls: cannot access ejb: Input/output error
    total 0
    d????????? ? ? ? ? ? ejb
    [root@localhost UMESH]#
    ----------------------------------------------------------------------------------------------------------------------------------------
    this what's happening with me. weird isn't it. The privileges for root for UMESH are as below
    ----------------------------------------------------------------------------------------------------------------------------------------
    [root@localhost media]# ll
    total 4
    drwxr-xr-x 3 vickey root 4096 1970-01-01 05:30 UMESH
    [root@localhost media]#
    ----------------------------------------------------------------------------------------------------------------------------------------
    Also i can't even paste a file in the USB. How do I solve this problem

  2. #2
    Just Joined! jaysunn's Avatar
    Join Date
    Apr 2009
    Location
    New York City - USA
    Posts
    18
    1) First step is to find the file's inode number:

    - take a terminal, navigate to the directory where you have this file
    - find the inode number using the below command:

    Code:
    # ls -il filename

    - Suppose you get the output like this:

    Code:
    777777 -rw-r--r-- 1 jaysunn jaysunn 0 2008-01-27 11:19 corrupted_file
    Then 777777 is the inode number.

    2) Delete the file using the inode number using the below command:

    Code:
    find . -inum [inode-number] -exec rm -i {} \;
    for example, to delete the file in my example, give this command:

    Code:
    find . -inum 777777 -exec rm -i {} \;

    Jaysunn

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,970
    It may be that the USB is mounted read-only. In that case, even the instructions given by jaysunn will/should not work. Execute the command 'mount' to see what the USB drive mount permissions. If it is read-only, then you need to unmount and remount it for read/write. Also, some USB drives are actually flash readers and if the flash card (I use them all the time) has its write-protect slide set to read-only, then you will not be able to modify the data on the device, resulting in the I/O errors you are seeing.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    how to make the read only into r/w

    hey how do I make the read only into read and write .

  5. #5
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,568

    Post

    I had a similar problem few months back - Check this
    http://www.linuxforums.org/forum/ins...ing-linux.html

    I deleted some files but unable to delete few others....so i just re-formated the drive after copying important data from it.
    - Lakshmipathi.G
    -------------------
    FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
    First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -------------------

  6. #6
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493

    solution not working

    I tried the link provided by lakshmipathi but it didn't work out for me. Here's the o/p
    -----------------------------------------------------------------------------------------------------------------
    [root@localhost ~]# mount -t vfat /dev/sdb1 /media/sdb1 -o defaults,umask=0
    mount: mount point /media/sdb1 does not exist
    [root@localhost ~]# mount -t vfat /dev/sdb1 /media/sdb1 -o defaults,umask=0
    mount: mount point /media/sdb1 does not exist
    [root@localhost ~]# cd /media/
    [root@localhost media]# mkdir sdb1
    [root@localhost media]# mount -t vfat /dev/sdb1 /media/sdb1 -o defaults,umask=0
    [root@localhost media]# ls
    sdb1
    [root@localhost media]# cd
    [root@localhost ~]# cd -
    /media
    [root@localhost media]# cd
    .hal-mtab .hal-mtab-lock sdb1/
    [root@localhost media]# cd sdb1/
    [root@localhost sdb1]# ls
    ls: cannot access ejb: Input/output error
    ejb
    [root@localhost sdb1]# ll
    ls: cannot access ejb: Input/output error
    total 0
    d????????? ? ? ? ? ? ejb
    [root@localhost sdb1]# rm -rf ejb
    rm: cannot remove `ejb': Input/output error
    [root@localhost sdb1]#

  7. #7
    Linux User vickey_20's Avatar
    Join Date
    Mar 2009
    Location
    Mumbai, India
    Posts
    493
    Quote Originally Posted by jaysunn View Post
    Code:
    # ls -il filename
    here's the op for u'r code pal
    ---------------------------------------------------------------------------------------
    [root@localhost sdb1]# ls -il ejb
    ls: cannot access ejb: Input/output error
    [root@localhost sdb1]# ll
    ls: cannot access ejb: Input/output error
    total 0
    d????????? ? ? ? ? ? ejb
    [root@localhost sdb1]#

  8. #8
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Unplug USB and plug it again. Execute this in Terminal :
    Code:
    tail -s 3 -f /var/log/messages
    Post output here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...