12-17-2009
Delete files in a folder with a specific ending
Hi I have files that end with .txt.txt that i want to delete. But I also have files that end with .txt that I want to leave intact. How do I specifically delete files that end with .txt.txt in a folder.
thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to write a script that deletes all folders and keep the last 10 recent folders.
I know the following:
ls -ltr will sort the folders from old to recent.
ls -ltr | awk '{print $9}' will list the folder names (with a blank line at the beginning)
I want to get the 10th folder from... (3 Replies)
Discussion started by: melanie_pfefer
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have some files on a folder and i want to delete all the files that were created on July.
Thanks,
Kobi. (9 Replies)
Discussion started by: kobibn
9 Replies
3. Shell Programming and Scripting
Hi!
Need your help. How can I delete the cache folder of multiple user home directories via automatically executed shell script on a Mac OS X Server?
Example:
The userdata are stored on a Xsan Volume like this:
/Volumes/Xsan/userdata/mike
/Volumes/Xsan/userdata/peter... (2 Replies)
Discussion started by: nipodrom
2 Replies
4. Shell Programming and Scripting
Hi ,
I need a script which basically deltes all files in folder a which are alreasy present in folder b
say folder a has files abc.txt
pqr .txt
and b has abc.txt
pqr.txt
rmr.txt
then file abc.txt and pqr.txt from a should be deleted (6 Replies)
Discussion started by: viv1
6 Replies
5. Shell Programming and Scripting
Hi I want to transfer all files in a folder to another folder. So the files have a ending of .lop.txt
thanks (4 Replies)
Discussion started by: gisele_l
4 Replies
6. Shell Programming and Scripting
Hi all,
I need to write a script to naviagate into the list of specified folder and delete the files in it.
I have mentioned the list of folders in a external file so it can be reusable.
The issue is am facing now is that, i am not understating on how to navigate into the folder locations... (6 Replies)
Discussion started by: Nithz
6 Replies
7. Shell Programming and Scripting
Hi,
I need to use rsync to delete multiple files(only specified files not all) using --delete option, these files are located in different target folders.
Instead of running rsync command multiple times for each file, can we achieve this with one time execution?
your help is much... (0 Replies)
Discussion started by: MVEERA
0 Replies
8. UNIX for Dummies Questions & Answers
Hi Experts,
i need a little help.
i have different folder that contain files that need to be deleted. but those folder contains huge amoung of same with 3 different extention.
what i used to do is to delete them using the rm commande
rm *.ext *.ext1 *.ext3
what i want to do is to have... (1 Reply)
Discussion started by: yprudent
1 Replies
9. Shell Programming and Scripting
I need help to write shell script to copy files from one server to another server.
Source Directory UAE(inside i have another folder Misc with files inside UAE folder).I have to copy this to another server UAE folder( Files should be copied to UAE folder and Misc files should be copied in target... (3 Replies)
Discussion started by: naresh2389
3 Replies
10. Shell Programming and Scripting
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
LEARN ABOUT DEBIAN
httpindex
httpindex(1) General Commands Manual httpindex(1)
NAME
httpindex - HTTP front-end for SWISH++ indexer
SYNOPSIS
wget [ options ] URL... 2>&1 | httpindex [ options ]
DESCRIPTION
httpindex is a front-end for index++(1) to index files copied from remote servers using wget(1). The files (in a copy of the remote direc-
tory structure) can be kept, deleted, or replaced with their descriptions after indexing.
OPTIONS
wget Options
The wget(1) options that are required are: -A, -nv, -r, and -x; the ones that are highly recommended are: -l, -nh, -t, and -w. (See the
EXAMPLE.)
httpindex Options
httpindex accepts the same short options as index++(1) except for -H, -I, -l, -r, -S, and -V.
The following options are unique to httpindex:
-d Replace the text of local copies of retrieved files with their descriptions after they have been indexed. This is useful to display
file descriptions in search results without having to have complete copies of the remote files thus saving filesystem space. (See
the extract_description() function in WWW(3) for details about how descriptions are extracted.)
-D Delete the local copies of retrieved files after they have been indexed. This prevents your local filesystem from filling up with
copies of remote files.
EXAMPLE
To index all HTML and text files on a remote web server keeping descriptions locally:
wget -A html,txt -linf -t2 -rxnv -nh -w2 http://www.foo.com 2>&1 |
httpindex -d -e'html:*.html,text:*.txt'
Note that you need to redirect wget(1)'s output from standard error to standard output in order to pipe it to httpindex.
EXIT STATUS
Exits with a value of zero only if indexing completed sucessfully; non-zero otherwise.
CAVEATS
In addition to those for index++(1), httpindex does not correctly handle the use of multiple -e, -E, -m, or -M options (because the Perl
script uses the standard GetOpt::Std package for processing command-line options that doesn't). The last of any of those options ``wins.''
The work-around is to use multiple values for those options seperated by commas to a single one of those options. For example, if you want
to do:
httpindex -e'html:*.html' -e'text:*.txt'
do this instead:
httpindex -e'html:*.html,text:*.txt'
SEE ALSO
index++(1), wget(1), WWW(3)
AUTHOR
Paul J. Lucas <pauljlucas@mac.com>
SWISH++ August 2, 2005 httpindex(1)