Sponsored Content
Top Forums Shell Programming and Scripting Return all sub directories on ftp server Post 302357812 by thriftinkid on Wednesday 30th of September 2009 04:53:46 PM
Old 09-30-2009
Return all sub directories on ftp server

Hey guys,

I'm new to the programming world in general, and I only write in applescript so far. I am trying to find a shell script that will return a list of all the sub directories (or folders) within a directory on my ftp server. The server needs a username and password. I would assume the translation to applescript would be something like below:


Code:
set ftp_path to "/path/to/dir/"
set ftp_name to "username"
set ftp_pw to "XXXXX"
set ftp_server to "ftp.mywebsite.com"
tell application "Finder"
    do shell script "missing shell command"
end tell

Is this wrong?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

FTP return value

Hi guys, I am having a problem to determine if the FTP request I had was successful or not... Here is what I do: In a shell script I call another shell script to do the FTP like: #!/bin/ksh echo "Hello..." ... # call do_ftp.sh do_ftp.sh $SERVER $USR $PASS $FILE.... status=$? if ; then ... (7 Replies)
Discussion started by: Shaz
7 Replies

2. Shell Programming and Scripting

return ftp status

Hello, I still have problems when trying to figure out if the status of an ftp was successful. I ftp to different types (nt, vax, unix, etc...) of machines. I am trying to write a universal script that will ftp a file and then check to see if the ftp was successful. I have tried the... (12 Replies)
Discussion started by: blt123
12 Replies

3. UNIX for Dummies Questions & Answers

FTP Return Code

Hi All, I have a problem to identify the error code thrown by FTP Server while uploading files. The message is : ftp return 32. I couldn't find out what is the meaning of that. :confused: OS is Sun Solaris 2.10. Anyone can help? Thanks a lot (1 Reply)
Discussion started by: wilsonSurya
1 Replies

4. IP Networking

FTP Return 32

Dear All, I have problem when uploading files the FTP Server threw message like this : ftp return 32. Files not get uploaded. OS is Sun Soalaris 2.10 Please help what is the meaning of that message... Thanks (3 Replies)
Discussion started by: wilsonSurya
3 Replies

5. UNIX for Dummies Questions & Answers

Any way to grep a string in directories and return the result with diskusage aswell?

What Im basically trying to do is this: I have a small script that can grep any parameter entered into a search string, then print to the screen the name of each file the parameter appears in as well as the file path, ie the directory. The code Im using just for this is.... Directory... (3 Replies)
Discussion started by: Eddeh
3 Replies

6. Shell Programming and Scripting

Return Value from a FTP shell script

Hello folks,,, I am calling a Unix shell script from java. The unix script is transferring a file through FTP. I wonder how can I confirm whether the script has been executed properly without any error. Is there any way to find the return value from the script. My FTP script is given below ... (3 Replies)
Discussion started by: dinesh1985
3 Replies

7. Red Hat

Implement FTP server on RHEL server without using FTP client

We have RHEL 5.8 in our environment, I had a query whether we can implement an FTP server using vsftpd package and Linux configurations like setsebool without using any external FTP clients like FileZilla etc. I am very confused on this. The FTP functionalities that should be present are download &... (3 Replies)
Discussion started by: RHCE
3 Replies

8. UNIX for Dummies Questions & Answers

Sort directories in 'D' on FTP server

Hello, There are 3 directories on FTP server with format yyyymmddhhmiss. Can someone please let tell me how do I sort these directories in descending order. I only have get the files from the latest directory on FTP server. ftp>ls -l 20150707011229 20150707061229 20150707131225 ... (2 Replies)
Discussion started by: pavan_test
2 Replies

9. Shell Programming and Scripting

Clear contents of specified directories, then return exit status

Hello, this is my first post here. I'm attempting to write a bash shell script to rm the contents of a directory without deleting the directory, specifically in OS X 10.10 . Here's what I have: function clear() { USER="$USER" DIR=$1 rm -rfv /Users/"$USER"/library/$DIR/* } clear... (6 Replies)
Discussion started by: YouNicks
6 Replies

10. Shell Programming and Scripting

Recurse directories and return random file

I have a nice program to change the background but I want it to operate on subdirectories as well. # Script to randomly set Background from files in a directory while true;do # Directory Containing Pictures DIR="/home/pc/Pictures" # Internal Field Separator set to newline, so file names... (4 Replies)
Discussion started by: triplemaya
4 Replies
CHSH(1) 							   User Commands							   CHSH(1)

NAME
chsh - change your login shell SYNOPSIS
chsh [-s shell] [-l] [-u] [-v] [username] DESCRIPTION
chsh is used to change your login shell. If a shell is not given on the command line, chsh prompts for one. chsh is used to change local entries only. Use ypchsh, lchsh or any other implementation for non-local entries. OPTIONS
-s, --shell shell Specify your login shell. -l, --list-shells Print the list of shells listed in /etc/shells and exit. -u, --help Print a usage message and exit. -v, --version Print version information and exit. VALID SHELLS
chsh will accept the full pathname of any executable file on the system. However, it will issue a warning if the shell is not listed in the /etc/shells file. On the other hand, it can also be configured such that it will only accept shells listed in this file, unless you are root. EXIT STATUS
Returns 0 if operation was successful, 1 if operation failed or command syntax was not valid. SEE ALSO
login(1), passwd(5), shells(5) AUTHOR
Salvatore Valente <svalente@mit.edu> AVAILABILITY
The chsh command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux July 2009 CHSH(1)
All times are GMT -4. The time now is 04:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy