UNIX File problem

This is a discussion on UNIX File problem within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I have a file in a directory on my UNIX account and I am trying to remove it. When I ...

  1. #1
    Still A Registered User DISGUISED's Avatar
    Join Date
    Aug 2001
    Posts
    499

    UNIX File problem

    I have a file in a directory on my UNIX account and I am trying to remove it. When I list the directory it is there, when I view the directory from WS_FTP it is there, but when I try to remove it then it tells me the file is not there. I get the standard "no such file or directory" on both the command line and WS_FTP.

    I figure maybe the permissions had been changed(somehow) and that's why I can't delete it, so I try to change the mode of the file and I get .. chmod: WARNING: can't access Filename.

    So then I decide to look in the manual, I type in man and accidently hit enter before I typed in what I wanted to look up and it says no manual entry for FileName where filename is the name of the file I want to delete. Now this is getting weird!!

    Anybody know what's going on here?

    Sun Solaris, System 5 Release 8

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,821
    I'm guessing you've got a filename with some non-printing characters in the filename

    Try something like (check man page for options)
    ls -b
    Should print all non-printable chars in \nnn octal format

    If you want to get rid of the file, try this
    1. make sure
    ls foo*
    lists only the filename in question. Find a pattern which matches only that filename

    2. use this to get rid of it
    rm -fi foo*
    replacing foo* with the pattern which uniquely matches the file without having to type any funny chars.

  3. #3
    Still A Registered User DISGUISED's Avatar
    Join Date
    Aug 2001
    Posts
    499
    I tried listing non printable characters with -b and - q and it didn't display any, but rm -fi Foo* worked beautifully so thank you very much.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 11:39 PM
  2. read from file problem
    By Martin Kovac in forum C Programming
    Replies: 1
    Last Post: 04-13-2009, 09:33 AM
  3. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 01:44 PM
  4. File Writing Problem
    By polskash in forum C Programming
    Replies: 3
    Last Post: 02-13-2009, 10:47 AM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 05:10 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21