Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have what I think is called an IP alias, which is used to access a Windows file server from a Unix server. The path on Unix looks something like:

/folder/file.txt

which is somehow resolved as:

\\server\folder\file.txt

This is used within an ftp command from a SAS program running on Unix. I know very little about Unix, but I believe the alias is configured on Unix itself (not by the SAS server). As a normal (non-root) user, is there a way of looking up this alias and seeing the IP address it refers to? Or even better, a list of aliases and their IP addresses?

Perhaps I'm using the wrong terminology? My Google searches have turned up command aliases, but otherwise I've found very little helpful information.

share|improve this question

closed as off topic by Oliver Salzburg May 18 '13 at 0:28

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Questions about Unix and Linux are equally on topic here and should not be migrated away. However, if you don't get an answer within, say a few days, feel free to have it migrated there by flagging again. Cheers –  slhck Mar 6 '13 at 22:07
1  
@slhck - Thanks. Didn't want to open a second, identical question on another site. The suggestion above is reasonable. –  JDB Mar 6 '13 at 22:14
    
Now reposted on Unix & Linux: unix.stackexchange.com/questions/76130/… –  Gilles May 17 '13 at 22:41
add comment

2 Answers

Unix lets you mount filesystems, including remote filesystems, under directories on your system. This is similar to the way you can attach a remote filesystem as a drive on your windows machine, e.g. creating a Z: that refers to \\server\folder. Instead of using drive letters, we have directories that refer to filesystems. So /folder could be a remote mount of a shared folder on the Windows file server, i.e. \\server\folder. Run the mount command, it will show you currently mounted filesystems, including remote ones. Also, do cat /etc/fstab and look for a line like

//192.168.0.244/Public  /networkstorage cifs    rw,user,noauto,guest  0 0

where //192.168.0.244/Public stands for \\192.168.0.244\Public and /networkstorage is the "mountpoint", the place in the Unix filesystem where the remote filesystem is attached.

IP aliases are something entirely different. Command aliases are not what you want either.

share|improve this answer
    
mount gave me a list, but it does not include the mounts that I use in the SAS program. I don't have access to /etc/fstab. Clearly I'll need to work this out with the admins. Thanks though. –  JDB May 18 '13 at 4:33
add comment

If the alias is defined on the Unix system, it should be in /etc/hosts.  Try using grep to search for the server name in /etc/hosts, or just browse the whole file to see all aliases that are defined there.

share|improve this answer
    
I actually tried that, but I thought I must have been mistaken because I couldn't find the alias there. (I used vi to search for "folder" and got nothin') –  JDB Mar 7 '13 at 22:22
    
Oops; I misread your question. I thought you were using an alias for the server name when you accessed the file on the server. If the server’s folder directory is showing up on the Unix system as /folder, then the Unix system probably has it mounted (as a remote file system). Type mount (or /etc/mount, if you get a “not found” error) and see whether you see server listed. –  Scott Mar 7 '13 at 22:41
add comment

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