Need help in sftp basic commands


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need help in sftp basic commands
# 1  
Old 06-14-2005
Need help in sftp basic commands

I'm trying to make use of some common generic functions already present in the scripts loaded in the environment.
A variable VAR1 is declared and used in the generic functions.
Its value is also set in the generic function.

Now I need to use that generic function for PURGING of some old files matching a pattern which are older than x days.
The suggested syntax is
find.. -name LDS-* -mtime +${VAR1} \
-exec ls -l {} \; >> ${LOG_PURGEFILE} 2>&1

But
1. find command does not work in sftp environment.
2. I need to declare VAR1=x, but I cant set the variables in a sftp session.
CUZ Setting variables in an sftp session in not possible. They can only be set outside the sftp and referenced in it
So pls advise how do I go about it..

Pls help ASAP..
# 2  
Old 06-15-2005
if you could append a date stamp to the end of the files you can easily find and remove the files you need. I dont think your generic function will work in a ftp session.
# 3  
Old 06-15-2005
Hi..
Thanks..
Can u pls elaborate how can I find and delete the files matching a particular pattern in sftp when I've suffixed the files with date.
I'm pretty new to unix and its actually a bad way to learn the way I'm doing..
Just copy pasting ..cuz of deadline..Smilie
So pls help ..

Thanks in adv
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Android

Basic commands for android!!

Hi, I have a n android phone and just rooted it. I access it using 'terminal Emulator'. I performed many basic linux-like commands in the terminal like rm,ls,df,reboot etc and they are working fine. But many of them are not like man <something>, clear,du etc. Can any of you please help to... (20 Replies)
Discussion started by: shekhar_4_u
20 Replies

2. Solaris

Required list of all basic commands for a beginners

I want the commands list to view only files, and only directories and all the basic commands for a beginner of solaris (1 Reply)
Discussion started by: omsingh2k5
1 Replies

3. Red Hat

Segmentation fault on basic linux commands

Hello out there!!! I have a Red Hat Entreprise Linux 4 server and I am encountering this error # grep Segmentation Fault I know it is not the right use of grep command, but I did that just for testing purpose,then I did # which grep /bin/grep # ls -l /bin/grep -rwxr-xr-x 1 root... (4 Replies)
Discussion started by: inhaki
4 Replies

4. UNIX for Dummies Questions & Answers

Vi editor basic commands

I would be thankful if anyone could show me commands to do the following tasks in vi:1) How can I undo or redo my last action in vi editor. 2) How can I copy only a word or a portion of line (not the whole line) in vi, like we can select text and press ctrl+c in notepad to copy any text. 3)... (4 Replies)
Discussion started by: nervous
4 Replies

5. UNIX for Dummies Questions & Answers

Why do basic unix commands not work in BASH

Why do basic unix commands such as "ls" not work in "BASH" mode?? I am frustrated!! (10 Replies)
Discussion started by: PixelLover
10 Replies

6. UNIX for Dummies Questions & Answers

Basic SFTP questions

I'm trying to find out what all is involved with setting up SFTP? 1) Do Solaris machines come with a SFTP server and client already installed. 2) If so would I have to install SFTP clients on windows, if I want to transfer files to a Solaris box? 3) If SFTP doesn't come prepackaged would I... (1 Reply)
Discussion started by: JohnRodey
1 Replies

7. Windows & DOS: Issues & Discussions

Basic Unix Commands for cygwin

Hi. I'm New user for this Forum.Presently i'm working with Cygwin I want to know the basic commands that will be used for Cygwin. Can anyone guide me on this regards Thanks & Regards Sanjay (0 Replies)
Discussion started by: sanjay.karthik
0 Replies

8. UNIX for Dummies Questions & Answers

basic commands documentation

I'm training a newbie on unix. He's in another site and I can't share my unix books with him - is there any documentation on basic unix commands he can download? (1 Reply)
Discussion started by: kdgorton
1 Replies

9. UNIX for Dummies Questions & Answers

Unix basic commands

I need a sheet with the basic unix commands , and commands for VI editor. Does anyone know where i can get them. (3 Replies)
Discussion started by: Peter Spellman
3 Replies
Login or Register to Ask a Question