Sponsored Content
Top Forums Shell Programming and Scripting ftp: Name or service not known Post 302519565 by methyl on Wednesday 4th of May 2011 09:45:22 AM
Old 05-04-2011
$PATH is a reserved variable in Shell. Use another name for the variable!

By changing the value of $PATH you have stopped your script from being able to find "ftp" ... or for that matter any program which is not in "file/bak".
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ftp: ftp/tcp: unknown service

Hello, when I type ftp on the server (Sco Unix 5.0.4) it gives an error messages which is "ftp: ftp/tcp: unknown service" but I have this service in '/etc/services' file. Also when I want to telnet from another machine to this machine is gives also 'telnet: tcp/telnet: unknown service' this... (2 Replies)
Discussion started by: alisevA3
2 Replies

2. AIX

Unix security -- FTP service????

I would like to ask for you suggestions or comments see if you can help. Since system auditing is under progress and the AIX is the main investigated unit. They are asking to disable the FTP service to enhance the security but I doubt. For daily use, the FTP will help administrator to download... (1 Reply)
Discussion started by: shanemcmahon
1 Replies

3. Linux

Better FTP service needed. (suspected inteferance)

Hello there, I have of recent been having overbearing problems with my Linux computer when accessing servers via FTP. The server behaves rather erractically and refuses to complete uploads, merely stalling the transfer for an unpredictable amount of time, which can stem from being either 5... (2 Replies)
Discussion started by: Noran Rad
2 Replies

4. Linux

Ftp Service /process Status

:confused: Hi Can anyone tell me how to check the FTP process status in linux . eg,I'm ftpping some files from "A" server to "B" server through FTP command , after ftpping these files , I 'm suppose to delete the files which are successfully ftpped from "A" server ,but when I 'm checking the... (1 Reply)
Discussion started by: GaneshB
1 Replies

5. UNIX for Dummies Questions & Answers

FTP service..please help me

could you please guys and gals to educate me about the ftp...implementation and how to use it on BSD? thanks a lot (2 Replies)
Discussion started by: lipbalm
2 Replies

6. Linux

Setting up FTP service +on Fedora 9

Hi all, I set up FTP service at my linuxAbox. Everything is good. When i did FTP from my LinuxB box , it authenticated just fine. The problem is: 1. I can't list the directory 2. when i use ls command to list the directory, it showed: 227 Entering passive mode... (2 Replies)
Discussion started by: c00kie88
2 Replies

7. AIX

Block users ftp service

Hello everyone I create a file /etc/ftpusers to block users. I put the names of the users and I refresh the service inetd. My question is the user still log in by ftp.???? What I miss Thanks for your opinions. Greetings (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

8. UNIX for Dummies Questions & Answers

FTP service/ set up

Hi Everybody, How can I understand when I login to any unix server that this server is having ftp service running? what I care is that I want to ftp something to this server and I can't, something like connection refuse. is there any ways to understand if the ftp is setup? and if not, how to set... (2 Replies)
Discussion started by: messi777
2 Replies

9. HP-UX

FTP service Enable/Disable

hi everybody, I can easily enable /disable the FTP service from SAM, how can I do this via command line? using inetd? how? cheers, messi (1 Reply)
Discussion started by: messi777
1 Replies

10. AIX

To stop ftp service on VIO

Hi all, How can I close ftp port 21 on VIO server. Best regards, ---------- Post updated at 10:06 AM ---------- Previous update was at 08:45 AM ---------- I resoved with switch to OS mode. $ oem_setup_env (0 Replies)
Discussion started by: getrue
0 Replies
command(1)							   User Commands							command(1)

NAME
command - execute a simple command SYNOPSIS
command [-p] command_name [argument...] command [-v | -V] command_name DESCRIPTION
The command utility causes the shell to treat the arguments as a simple command, suppressing the shell function lookup. If the command_name is the same as the name of one of the special built-in utilities, the special properties will not occur. In every other respect, if command_name is not the name of a function, the effect of command (with no options) will be the same as omitting command. The command utility also provides information concerning how a command name will be interpreted by the shell. See -v and -V. OPTIONS
The following options are supported: -p Performs the command search using a default value for PATH that is guaranteed to find all of the standard utilities. -v Writes a string to standard output that indicates the path or command that will be used by the shell, in the current shell execu- tion environment to invoke command_name, but does not invoke command_name. o Utilities, regular built-in utilities, command_names including a slash character, and any implementation-provided functions that are found using the PATH variable will be written as absolute path names. o Shell functions, special built-in utilities, regular built-in utilities not associated with a PATH search, and shell reserved words will be written as just their names. o An alias will be written as a command line that represents its alias definition. o Otherwise, no output will be written and the exit status will reflect that the name was not found. -V Writes a string to standard output that indicates how the name given in the command_name operand will be interpreted by the shell, in the current shell execution environment, but does not invoke command_name. Although the format of this string is unspecified, it will indicate in which of the following categories command_name falls and include the information stated: o Utilities, regular built-in utilities, and any implementation-provided functions that are found using the PATH variable will be identified as such and include the absolute path name in the string. o Other shell functions will be identified as functions. o Aliases will be identified as aliases and their definitions will be included in the string. o Special built-in utilities will be identified as special built-in utilities. o Regular built-in utilities not associated with a PATH search will be identified as regular built-in utilities. o Shell reserved words will be identified as reserved words. OPERANDS
The following operands are supported: argument One of the strings treated as an argument to command_name. command_name The name of a utility or a special built-in utility. EXAMPLES
Example 1: Making a version of cd that always prints out the new working directory exactly once cd() { command cd "$@" >/dev/null pwd } Example 2: Starting off a ``secure shell script'' in which the script avoids being spoofed by its parent IFS=' ' # The preceding value should be <space><tab><newline>. # Set IFS to its default value. unalias -a # Unset all possible aliases. # Note that unalias is escaped to prevent an alias # being used for unalias. unset -f command # Ensure command is not a user function. PATH="$(command -p getconf _CS_PATH):$PATH" # Put on a reliable PATH prefix. # ... At this point, given correct permissions on the directories called by PATH, the script has the ability to ensure that any utility it calls is the intended one. It is being very cautious because it assumes that implementation extensions may be present that would allow user func- tions to exist when it is invoked. This capability is not specified by this document, but it is not prohibited as an extension. For exam- ple, the ENV variable precedes the invocation of the script with a user startup script. Such a script could define functions to spoof the application. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of command: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH. PATH Determine the search path used during the command search, except as described under the -p option. EXIT STATUS
When the -v or -V options are specified, the following exit values are returned: 0 Successful completion. >0 The command_name could not be found or an error occurred. Otherwise, the following exit values are returned: 126 The utility specified by command_name was found but could not be invoked. 127 An error occurred in the command utility or the utility specified by command_name could not be found. Otherwise, the exit status of command will be that of the simple command specified by the arguments to command. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
sh(1), type(1), attributes(5), environ(5), standards(5) SunOS 5.10 17 Jul 2002 command(1)
All times are GMT -4. The time now is 01:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy