I need Unix help

OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
What are BSD and GNU? Might be stupid questions. Sorry if they are. Anyway, I tried to go that that same directory as that person in your first link to install GNU rm, and it said no such file or directory. When I tried to use your second suggestion, I got:

damien-hand-cannanes-macbook-pro:502 Damien$ ls -il
ls: \004␀␀␀ö\001␀␀.\024␀␀: File name too long
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
Another thing you might try is deleting the file by inode:

http://www.cyberciti.biz/tips/delete-remove-files-with-inode-number.html

Doing what is suggested above maybe your best solution:

first either

cd /Volumes/"WINDOWS HD"/.Trashes/502/

or cd /Volumes/WINDOWS\ HD/.Trashes/502/

ls -il

Example of the ls command above.

Output:
782263 -rw-r--r-- 1 viv viv 0 2006-01-27 15:49 \+Xy \+\8

Note: 782263 is inode number.
(d) Use find command to delete file by inode:

Find and remove file using find command, type the command as follows:
$ find . -inum 782263 -exec rm -i {} \;

Note the number in the first column or the listing use that in the find command.

sudo find . -inum XXXXX -exec rm -i {} \;

The -i option on the delete is to confirm the deletion of the file.
 
Joined
Jan 24, 2008
Messages
12
Reaction score
2
Points
3
Unfortunately it looks as if ls is having the same issue with the filename length. The GNU (as in GNU's Not Unix) utilities can be located here:


http://directory.fsf.org/project/coreutils/


These will require compiling. I suggest downloading to their own directory (say $HOME/GNU/coreutils) and then issuing the following set of commands from a Terminal within that directory:

./configure
make
sudo make install

This will place the GNU utilities in /usr/local/bin and you can either add that to your path, or access the new utilities directly - eg "/usr/local/bin/rm ..."

Let us know if this helps.
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
try stat.

stat *

personally I'd do that before changing to a different ls, unless you anticipate frequent occurrences of 255+ character named files.

pseudo-example.. because stat * would be too long ;)

[froot@beer ~]$ stat yum.conf
File: `yum.conf'
Size: 578 Blocks: 8 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 17039680 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 518/ froot) Gid: ( 521/ froot)
Access: 2007-10-10 09:49:06.000000000 -0700
Modify: 2007-01-25 09:22:24.000000000 -0700
Change: 2007-10-10 09:49:02.000000000 -0700
 
OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
damien-hand-cannanes-macbook-pro:502 Damien$ stat
70937508 91692292 crw--w---- 1 Damien tty 268435456 0 "Apr 2 15:06:27 2008" "Apr 2 15:06:27 2008" "Apr 2 15:06:27 2008" "Apr 2 15:06:27 2008" 131072 0 0 (stdin)
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
you'll need the splat.

stat *

Then look for your oddly named file :)
 
OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
damien-hand-cannanes-macbook-pro:502 Damien$ stat *
stat: \004␀␀␀ö\001␀␀.\024␀␀: stat: File name too long
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
you would need to move into the directory and then do a stat *, per Dysfunction
 
OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
Which directory, /Volumes/"WINDOWS HD"/.Trashes/502/?

BTW, I really appreciate you guys trying to help me.
 
Joined
Feb 13, 2005
Messages
1,186
Reaction score
73
Points
48
Location
New Orleans, LA, USA
Your Mac's Specs
13" Macbook Pro 2.26Ghz Unibody 4G RAM 160G HDD Superdrive
Hmm, we're getting deep into Stupid UNIX tricks. How about trying unlink ?

Also you're original picture shows that file as being an alias. That's the same as a symlink in any other UNIX/Linux whether it be BSD or Sys V. There IS a way to remove that file, you just have to figure out how. Is there anything important in that '502' directory? Because if not, I'd go to the .Trashes directory and do an rm -r 502 as a kind of 'nuke from orbit' kind of thing.

It's the only way to be sure.
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
damien-hand-cannanes-macbook-pro:502 Damien$ stat *
stat: \004␀␀␀ö\001␀␀.\024␀␀: stat: File name too long

Is there some kind of super deleter program I can get?
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
Well, I'm out of ideas :)

Maybe

sudo rm -rf /Volumes/"WINDOWS HD"/.Trashes/502/

?

That, working by design, will delete the /Volumes/"WINDOWS HD"/.Trashes/502/ recursively.
 
Joined
Mar 6, 2008
Messages
127
Reaction score
3
Points
18
Location
Devon, United Kingdom
Your Mac's Specs
17" eMac 1.42 GHz G4, Mac OS X 10.4 "Tiger"
I'm curious to know just what's in this seemingly indestructible file. :p
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
If I remember correctly in the other thread it showed a finder window showing it as a 0 byte file
 
Joined
Jan 24, 2008
Messages
12
Reaction score
2
Points
3
rename?

I wonder, Since we have seen the file with finder - can he maybe rename the file there and then delete it? Just brainstorming.
 
OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
When I try to rename the file with Finder, it says

"The operation could not be completed.

An unexpected error occurred (error code -43)."
 
OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
When I try to rename in Terminal, this is what I get:

damien-hand-cannanes-macbook-pro:502 Damien$ mv \004␀␀␀ö\001␀␀.\024␀␀ ./file
mv: rename 004␀␀␀ö001␀␀.024␀␀ to ./file: File name too long
 
OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
Why do I get two different file names that display in Terminal for this thing, anyway?

Well, when I copy and paste them into Word and blow it up, this is what I get. Ignore the "./file" at the end of the one. I copied that from the line where I was trying to rename the file.

File.jpg
 
OP
Thundermoon1994
Joined
Dec 26, 2006
Messages
495
Reaction score
7
Points
18
Location
Kent, OH
Your Mac's Specs
15" MacBook Pro w/ 2.4 GHz C2D, 4 GB RAM, 250 GB
I fixed it! I decided to try attacking it from the Windows side again. When I started up Windows, it asked to perform a disk check. It discovered the folder 502, said it was unrecoverable, and asked if I wanted Windows to convert the folder to a file. It ignored the rogue file inside it a converted the whole thing into a little file. I dragged the file into the recycle bin and told it to empty. Alas, problem solved.

A very big thanks to everyone who tried to help me. You guys rock!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top