Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This question is based on this question.

I have two Macbooks in the same network. Both computers get the internet from the network.

I guess that I can share files between the two Macs without Internet.

I have tried to put files to the folder /net/localhost/ but I get

localhost: Operation timed out

when I try to copy a dummy file there.

The same problem is in both Macs. This suggests me that I do something wrong.

How can you share files between two Macs in localhost?

share|improve this question
1  
/net/localhost is not what you want - /net is used to mount NFS servers. 2 (recent) Macs connected to the same local network should be able to see each other and share files via Bonjour and AFP as explained by msanford. If you cannot even ping the other Mac, there must be some basic connectivity problem. Could you describe your network setup in a bit more detail? Are there any other computers besides the 2 Macs? –  Marie Fischer Jul 8 '09 at 23:29
    
@Marie: There is no other computers of mine besides. --- There is at least 10 computers of other people at my area. –  Masi Jul 9 '09 at 15:35
add comment

3 Answers

up vote 4 down vote accepted

I don't understand what you mean by sharing files in localhost, since localhost is by definition the local machine. What are you attempting to do with /net ? Is it an NFS mount-point?

To enable file sharing in OS X, go to the Apple menu (top left of every screen) and select System Preferences > Sharing, and enable File Sharing on the target machine (i.e., on both machines if you want to share files bilaterally). Note that this is AFP, the Apple File-sharing Protocol, not NFS.

Then, in the Finder, type Shift-Apple-K and you should see your other computer(s) in the LAN, including accessible Samba/Windows shares. You will need to connect either to shares you have made publicly-accessible, or to connect using an authorized user account on the local machine (just like ftp: you have anon and local users).

share|improve this answer
2  
PS Upon re-reading this post, I notice that you have pasted what looks like a shell response ("localhost: Operation timed out"). What exactly are you doing to copy the files: scp, rsync, cp…? –  msanford Jul 4 '09 at 2:28
    
@msanford: I am trying to cp. –  Masi Jul 4 '09 at 10:28
    
So to 'copy the files to the network', you must be trying to do it to an NFS-mounted share? –  msanford Jul 4 '09 at 21:30
    
PS Check this out, just pulled it from FOSSLC fosslc.org/drupal/node/460 –  msanford Jul 5 '09 at 3:42
1  
Even on my LAN, with a wired connection, I often use ssh/scp to copy files between hosts because it's what I'm most familiar with and scp is very easy to use. It also keeps me in the habit of always using a secure copying tunnel, so pushing files to remote hosts is also secure by instinct (for lack of a better expression). –  msanford Jul 10 '09 at 18:48
show 2 more comments

A Quick way to share files is also to just put the files in the Sites Directory of your user and enable Websharing in the Sharing tab of the System Preferences, now you can just surft to your mac and download the files (something like http://YOURMAC.local/~USERNAME/file.txt )

share|improve this answer
    
@SideShowCoder: I cannot see the site of MacA at my MacB which is in the same network. That is we both use the same network which gives us the Internet. –  Masi Jul 4 '09 at 10:39
1  
@Masi - Can you ping the other Mac using ping and the IP address? If so, check the firewall and if it's not showing up via Bonjour then you may not have mDNSResponder running (which is by default) –  Chealion Jul 4 '09 at 16:28
1  
Check if you can ping via IP should be the first thing, Check your IP vai Network Utility for example you can ping from there, too. If you can ping, try putting a file named index.html with just "test" for example in it in your Users Sites directory and try Access like YOURIP/~USERNAME If you enable Webshareing via the Sharing tab in the Sys Pref the firewall should be ajusted by itself. –  Sideshowcoder Jul 4 '09 at 19:15
    
I cannot ping the other Mac. –  Masi Jul 4 '09 at 22:03
add comment

In the Finder, select 'Help', then search for 'Sharing files on your network'. Follow the instructions. This will turn one of the machines into a server, then on the client, select 'Connect to Server...' from the Go menu. You should be all set.

share|improve this answer
    
I cannot see the content at MacB. I see the following files.getdropbox.com/u/175564/fileSharing.png –  Masi Jul 4 '09 at 10:51
    
If MacB is the computer HLn, you still need to click on Connect to Server... to see the mount points available. –  Chealion Jul 4 '09 at 16:26
    
It says that the server cannot be read or written as I try to connect to the server. I press at the same time Connect to the server unsuccessfully. –  Masi Jul 12 '09 at 20:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.