chinni005 Posted January 5, 2015 Report Posted January 5, 2015 nenu FTP use chesi oka remote server ki connect avthunnanu.. I want to check an existence of file on remote server.. search chesthe can you help me how to check existence of a remote file over FTP? how can I achieve this over FTP please help?
ramafdb Posted January 5, 2015 Report Posted January 5, 2015 nenu FTP use chesi oka remote server ki connect avthunnanu.. I want to check an existence of file on remote server.. search chesthe SSH use chesi check chymantunnaru but when i use it connection refuse on port 22 antundhi,.. how can I achieve this over FTP please help? uncle port 21 FTP ki 22 SFTP ki
chinni005 Posted January 5, 2015 Author Report Posted January 5, 2015 uncle port 21 FTP ki 22 SFTP ki yeah got it... can you help me how to check existence of a file over FTP?
ramafdb Posted January 5, 2015 Report Posted January 5, 2015 yeah got it... can you help me how to check existence of a file over FTP? naaku script antha idea ledhu uncle but sftp server ayitey adi u can't connect using 21 remainging antha same list directory
chinni005 Posted January 5, 2015 Author Report Posted January 5, 2015 y do u need a script for that I'm doing a script for a whole other purpose and I need to include this check in that script , say ......... if [file remote file exists]; then do something else do nothing fi
Keratam Posted January 5, 2015 Report Posted January 5, 2015 ls to list the names of the files in the current remote directory
chinni005 Posted January 5, 2015 Author Report Posted January 5, 2015 naaku script antha idea ledhu uncle but sftp server ayitey adi u can't connect using 21 remainging antha same list directory ls $filename is giving me this error "usage: ls remote-directory local-file" , ftp server is not understanding 'ls' command
chinni005 Posted January 5, 2015 Author Report Posted January 5, 2015 ls to list the names of the files in the current remote directory ls $filename is giving me this error "usage: ls remote-directory local-file" , ftp server is not understanding 'ls' command bruh, please read above quote..
Keratam Posted January 5, 2015 Report Posted January 5, 2015 bruh, please read above quote.. bro it shud work if you connected successfully 1
Keratam Posted January 5, 2015 Report Posted January 5, 2015 try this to connect ftp #!/bin/bashhostname="<host>"ftp -i -nv $hostname << EOF user <username> <password>ls -R EOF
chinni005 Posted January 5, 2015 Author Report Posted January 5, 2015 weird thing enti ante I have 3 files in the remote location 323232.xml chinni005 keretam 32323.pdf chilligaari spiderreddy official.pdf same ilage 3 files unnayi including spaces and all the file names are same format, when I do "ls 323232.xml" it is giving me correct results but when I do "ls chinni005 keretam 32323.pdf" it is giving me the error "usage: ls remote-directory local-file" please Help..!!
chinni005 Posted January 5, 2015 Author Report Posted January 5, 2015 try this to connect ftp #!/bin/bashhostname="<host>"ftp -i -nv $hostname << EOF user <username> <password>ls -R EOF trying...
spidereddy Posted January 5, 2015 Report Posted January 5, 2015 if [-f $filename] then echo ''exist'' else echo ''doesn't exist'' fi
spidereddy Posted January 5, 2015 Report Posted January 5, 2015 try this to connect ftp #!/bin/bashhostname="<host>"ftp -i -nv $hostname << EOF user <username> <password>ls -R EOF why do u need a script to connect ftp.. ftp <servername> <username> <password> enuf ryt??
Recommended Posts