06-26-2012
Delete files older than 1 year through FTP
Hi All,
I want to login to a remote server using FTP command and then check for files older than 1 year and delete those files.
Please let me know how can i achieve this using Unix Commands.
Thanks in Advance,
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm trying to delete files that were created/modified in the year 2005 that we compressed and have the .Z extension on them. I tried using the awk utility but the syntax is incorrect. I don't know how to use a wildcard to capture all the compressed files. Here's the code I used
( ls -lR |... (5 Replies)
Discussion started by: igidttam
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I want to delete older files from ftp server.
(files which are more than 5 days old).
Please advice
Thanks ,
sam (3 Replies)
Discussion started by: sam99
3 Replies
3. Shell Programming and Scripting
Hi All,
I want to get those the files which were created before 20 days.
Say, we have two server, remote server and local server.
I want to get only 20 days older files from remote server to my local server.
I have used following code for ftp:
(echo "
user ${USERNAME}... (2 Replies)
Discussion started by: priyankak
2 Replies
4. UNIX for Dummies Questions & Answers
can someone provide a command to delete files by year? I have several files created last year 2009.
Im trying to list first ls -lrt | grep '/2009/ {print $10}' by it returns no result.
Pls advise (2 Replies)
Discussion started by: lhareigh890
2 Replies
5. Shell Programming and Scripting
I have to retain only 1 day files in my system an I have to delete all the other files which are older than 24 hrs. Please let me know the option I have to give in the find -mtime command. (3 Replies)
Discussion started by: rajesh8s
3 Replies
6. Shell Programming and Scripting
Hi
I have lot of files and subdirectories inside a directory which are created in the years 2006, 2007, 2008, 2009 and 2010.
I want to delete all the files and subdirectories belonging to the year 2006 alone.
How can I do that ? (5 Replies)
Discussion started by: samsungsamsung
5 Replies
7. Shell Programming and Scripting
Hi All,
how can i delete files from my Unix directory on the basis of year, i have files from 2001 to till 2014, but from their, i have to delete only 2013 file.Below is my file name
rwxrwxrwx 1 guopt users 5169 Jul 12 00:30 grt592_20130712003000.SAP
Thanks
Kki (2 Replies)
Discussion started by: kki
2 Replies
8. Shell Programming and Scripting
Hi. There is a process which creates log files in the below naming format processname.20140425.log processname1.20140425.log And in this path along with these logs there are other files which have the timestamp from 2012 and i want to have a script in place to delete only the above log files... (13 Replies)
Discussion started by: nanz143
13 Replies
9. UNIX for Beginners Questions & Answers
I have more than 200K files created in year 2017 under directory having size of 50GB.
I want to all these files in one shot.
Is there any faster option available with find command to delete all these file ? (6 Replies)
Discussion started by: sp23029
6 Replies
FTPFS(4) Kernel Interfaces Manual FTPFS(4)
NAME
ftpfs - file transfer protocol (FTP) file system
SYNOPSIS
ftpfs [ -/dq ] [ -m mountpoint ] [ -a password ] system
DESCRIPTION
Ftpfs dials the TCP file transfer protocol (FTP) port, 21, on system and mounts itself (see bind(2)) on mountpoint (default /n/ftp) to pro-
vide access to files on the remote machine. If required by the remote machine, ftpfs will prompt for a user name and password. The user
names ftp and anonymous conventionally offer guest/read-only access to machines. Anonymous FTP may be called without user interaction by
using the -a option and specifying the password.
By default the file seen at the mount point is the user's remote home directory. The option -/ forces the mount point to correspond to the
remote root.
To avoid seeing startup messages from the server use option -q. To see all messages from the server use option -d.
To terminate the connection, unmount (see bind(1)) the mount point.
EXAMPLE
You want anonymous FTP access to the system export.lcs.mit.edu. The first import(4) command is only necessary if your machine does not
have access to the desired system, but another, called gateway in this example, does.
import gateway /net
ftpfs -a yourname@yourmachine export.lcs.mit.edu
SOURCE
/sys/src/cmd/ftpfs
SEE ALSO
bind(2)
BUGS
Symbolic links on remote Unix systems will always have mode 0777 and a length of 8.
After connecting to a TOPS-20 system, the mount point will contain only one directory, usually /n/ftp/PS:<ANONYMOUS>. However, walking to
any valid directory on that machine will succeed and cause that directory entry to appear under the mount point.
Ftpfs caches files and directories. A directory will fall from the cache after 5 quiescent minutes or if the local user changes the direc-
tory by writing or removing a file. Otherwise, remote changes to the directory that occur after the directory has been cached might not be
immediately visible.
There is no way to issue the appropriate commands to handle special synthetic FTP file types such as directories that automatically return
a tar of their contents.
FTPFS(4)