0

I have been working at this company for around 8 years now and something that has always puzzled me is that we have a software supplier who often connects to our network to provide user support on their software to our users etc.

My question is when they need to connect to our server I have noticed that they run these commands on their desktop to access our server:

$ modem1
$ internet
$ take EUUK_9010

I take it EUUK_9010 is our customer number to them or something, but what do the other commands do? This seems to be the equivalent of them opening up a terminal and writing ssh root@our.ip, why don't they just do that?

  • They all look like aliases / functions; if using bash you can look for their definition in /etc/bashrc or in ~/.bashrc – kos Sep 2 '15 at 8:38
  • ... Or local scripts (or executables) – Jeff Schaller Sep 2 '15 at 9:03
  • May this help? – Pandya Sep 2 '15 at 9:15
  • If it's an executable file, try which modem1 and if it's a shell script, you can just read what it does. A respectable command should have a man page, or at least --help switch (or something like that). However, as these are nonstandard (never heard of) commands, probably made specifically for some local purpose, they probably don't follow the common agreements about input argument parsing, documentation and so on. – orion Sep 2 '15 at 9:45
  • 1
    whichis a cs script and only works if you are using the csh. If you use a standard compliant shell, the command you like to use is rather type that will tell you whether a command argument is an alias, a built-in command an external filesystem based program or unknown. – schily Sep 2 '15 at 10:03
3

None of these commands are standard Unix ones so they can be anything.

First have a look to what the shell is actually calling when they are run:

$ type modem1

Type will likely tell the queried command is an alias, a function, or an executable file.

In the latter case, you can use the file command to figure out if it is a shell script or a binary, eg:

$ file /usr/bin/modem1

Note: To figure out what will eventually be executed when you enter a command under a POSIX or Bourne shell (e.g. sh, ksh, zsh, bash, ash, dash, etc.), make sure you use the type command and not the which one. The latter is not specified by POSIX so might be missing from a Unix system. Moreover, the which executable often present in Unix/Linux systems will give useless information when a command present in the PATH is overridden by an alias or a function. You only want which if you use a csh family shell like tcsh.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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