What ftp command will change you to $HOME or ~
I am trying to create some generic scripts for ftping files that work both on AIX and Linux. On AIX, when your in ftp, you can still change to ~ or $HOME just like you would if you weren't in ftp. While these command work on Linux, they don't seem to work on Linux when you're in ftp. Any suggestions?
|
cd when outside ftp client (in the shell)
lcd when incide ftp that is "local cd" :) |
Sorry, I didn't do a very good job of really explaining what I need. I need to be able to change into a subdirectory in $HOME, but $HOME doesn't always have the same name on every box. I want to distribute software to a directory called common directory on a box, and if the common directory doesn't exist, I want to create it. This has to work regardless of the name of the home directory. For example. The script that is doing ftp spools to a file on the source server. It does a cd ~/common. It checks the error in the log file on the source server to find out if the directory existed or not. If it doesn't, it will create it with mkdir ~/common. By doing this, I can reduce the number of times I have to change directories. I'm currently using the code on sun and iax, but I can't get it to work on linux. That's why I need something at implies $HOME in ftp.
|
do you mean like 'cd $h '?
|
What I need is a variable or alias that substitues from $HOME while using ftp. I want to be able to create subdirectories without fully qualifying or changing to the parent directory. For example. if $HOME is equal to /u01/app/oracle and I'm in /tmp and I want to create a directory in /u01/app/oracle called common. I want to do mkdir $HOME/common or ~/common. I don't want to have to type in /u01/app/oracle because the path is not the same on all of our boxes, and to save time, I don't want to do a lot of directory switching. We have some that are /u101/app/oracle and some that are /u01/app/oracle, they are both $HOME on one or more boxes. I'm trying to create a generic script that can build directory structures on any of our boxes and because the naming conventions are not the same, I need something symbolic to represent $HOME during the ftp process.
|
All times are GMT -5. The time now is 10:56 AM. |