LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 08-17-2010, 11:26 AM   #1
booyeeka
LQ Newbie
 
Registered: Apr 2010
Posts: 12

Rep: Reputation: 0
[ncftp] how to delete oldest directory and file using ncftp commands


hi all!

i use ncftp for some bash script action.

can you help me how to delete oldest directory and oldest file using ncftp commands?


thank you in advance!
 
Old 08-17-2010, 12:02 PM   #2
stuart_cherrington
Member
 
Registered: Aug 2008
Location: Get back in your Cube Unix Boy!
Distribution: rh5, oel5, debian etch, solaris
Posts: 228

Rep: Reputation: 36
Could you not use the '!' option to drop to a shell command and delete them that way?

Last edited by stuart_cherrington; 08-17-2010 at 12:21 PM. Reason: typo
 
Old 08-17-2010, 12:04 PM   #3
booyeeka
LQ Newbie
 
Registered: Apr 2010
Posts: 12

Original Poster
Rep: Reputation: 0
i don't know about !@

i just find out ncftpls. maybe that can help me?


updated:
i tryed with

ncftpls -u myname -p mypass -x "-tl1 | head -n 2 " ftp://myserver/backup

it returns me a list, but can you help me how to use it?

help please...

Last edited by booyeeka; 08-17-2010 at 12:16 PM.
 
Old 08-17-2010, 12:23 PM   #4
stuart_cherrington
Member
 
Registered: Aug 2008
Location: Get back in your Cube Unix Boy!
Distribution: rh5, oel5, debian etch, solaris
Posts: 228

Rep: Reputation: 36
No you can't delete using ncftp or any of its other connotations.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CHMOD while using ncftp olivf Linux - General 3 04-20-2010 12:54 PM
ncftp output fails with cron mattbenton Linux - Networking 2 06-29-2009 05:30 AM
ncftp commands.. kurrupt Linux - Software 1 08-23-2004 07:55 PM
NCFTP bash script dezeque Linux - Networking 1 04-29-2004 04:55 PM
where can i get the sourcecode of Ncftp? whepin Linux - General 3 03-30-2002 03:50 AM


All times are GMT -5. The time now is 12:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration