![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vi editor basic commands | nervous | UNIX for Dummies Questions & Answers | 4 | 10-19-2006 05:55 PM |
| Basic SFTP questions | JohnRodey | UNIX for Dummies Questions & Answers | 1 | 09-28-2005 06:01 AM |
| Basic Unix Commands for cygwin | sanjay.karthik | Windows & DOS: Issues & Discussions | 0 | 07-25-2005 06:38 AM |
| basic commands documentation | kdgorton | UNIX for Dummies Questions & Answers | 1 | 02-20-2005 01:19 AM |
| Unix basic commands | Peter Spellman | UNIX for Dummies Questions & Answers | 3 | 08-10-2001 04:41 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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.. |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
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
|
|||
|
|||
|
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.. So pls help .. Thanks in adv |
|||
| Google The UNIX and Linux Forums |