LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-16-2001, 08:02 AM   #1
Zorba
LQ Newbie
 
Registered: Oct 2001
Posts: 1

Rep: Reputation: 0
Samba and Dave


Totally newbie.

When I try to copy a file from my mac (Dave installed) to my Linux-box the file
becomes 3 where one is the correct file and the other gets the ext. AfpInfo: $DATA and AFP Resource:$DATA.

How do I get rid of these?
 
Old 10-16-2001, 04:16 PM   #2
bmckee
LQ Newbie
 
Registered: Oct 2001
Location: Ontario, Canada
Distribution: Red Hat 7.1
Posts: 11

Rep: Reputation: 0
Samba and Dave

Not a solution, but might help....for what it's worth
(I'm a real Linux newbie, but have some Mac experience) I believe those two other 'files' are the 'resource forks' that Macs use instead of .xxx file name extensions to identify file type, icon etc. Don't know how to 'shut it off' but I would think it should be an option in there somewhere. What happens if you zip it or binhex it and then unzip in Linux? Note that if you do 'get rid of it' when you copy file back to Mac you probably will end up with a blank icon and no program associated to run it.

Hmm - just had a thought - I'm assuming you aren't using OSX - I haven't got a clue how it works (yet)
 
Old 10-16-2001, 08:10 PM   #3
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
bmckee nailed it.
AFP is Apple File Protocol, and the "extra" files are components of the "real" file that the Mac OS keeps hidden from you. You'll see the same thing if you put a PC-formatted floppy in a Mac, copy a file to it, and take it back to the PC. Windows will display not only the core file, but a lot of other "Mac droppings".

You don't want to delete/move/rename these components if you need to use the file in a Mac again.
 
Old 07-22-2004, 06:33 PM   #4
billster
LQ Newbie
 
Registered: Jul 2004
Location: Orange County, California
Distribution: Debian
Posts: 1

Rep: Reputation: 0
One reason you might want to remove the AFPInfo files: they don't play nicely with Windows.

If you set up a Samba server on your Linux box, then try to copy files from it to your PC, the copy action will fail on any AFPInfo file.

If you have thousands of files, it can take many hours to clear all those files out just to do a simple copy. Or, you can use this perl script to do it in 10 seconds:
----------------------------------------------
#!/usr/bin/perl -w

use File::Find;

sub process_file {
$name = $File::Find::name;

if ( ($name =~ /AFP_AfpInfo/) ) {
print "Deleting: $File::Find::name\n";
# unlink ("$name");
}
}

@ARGV = ('.') unless @ARGV;

find (\&process_file, @ARGV);
-----------------------------------------------

This script accepts one or more directories as arguments. It then recursively searches them for the dreaded AFPInfo files, and deletes them all. The code is grafted from two examples in O'Reilly's "Perl Cookbook."

Test it first by running it with the "unlink" (delete) command commented out, as shown. Verify that it's not about to delete anything you want to keep. Then uncomment the "unlink" and run it again. All your Mac extension files will be removed.

I accept no liability if this script eats your homework. However, it did work for me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba/Cups print sharing problems (/var/spool/samba files) Gates1026 Linux - General 9 06-23-2013 01:33 AM
Dave Aitel talks about security titanium_geek Linux - News 1 05-08-2005 09:09 PM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 05:54 AM
Linux, Samba, DAVE, Macs and PCs cliffyman Linux - Networking 0 12-03-2001 08:20 AM
Samba and DAVE for mac Sathe Linux - Networking 3 11-14-2001 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration