07-02-2010
Scott
Thanks! It works great!
One more question how can I modify the code to dellete all files but keeping the ones that DO NOT have any file extension?
Thanks one more time.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a directory which contains files.This Directory keeps getting in new files from time to time.I want to maintain only 15 files in that directory at any time and the old files should be deleted.
Eg:
Directory 'c' @'a/b/c contains:
1_a
2_a
3_a...
I want to delete all the old... (2 Replies)
Discussion started by: shiroh_1982
2 Replies
2. UNIX for Dummies Questions & Answers
hi everybody,
urgently need solutioin
aftet i execute the command df -k, i get to see al the memory status blah blah
if some file system has 95% full then what should i do and any help on how and what to do ?
help really appriciated.
cheers (4 Replies)
Discussion started by: ajayr111
4 Replies
3. UNIX for Dummies Questions & Answers
Greetings,
I need to delete all files that contain the word thumbs. Those files are spread all throughout sub-directories in a file directory tree.
Is there a script or single line command that will find all files with the word thumbs, and simply delete the file?
For example:
Delete... (4 Replies)
Discussion started by: ..Chris..
4 Replies
4. Shell Programming and Scripting
Hi, Dear all:
One question ! ^_^
I'm using bash under Ubuntu 9.10.
My question is not to rename all ".JPG" files to ".jpg" in a single folder, but to rename all ".JPG" files to ".jpg" in all subfolders.
To rename all ".JPG" to ".jpg" in a single folder,
for x in *.JPG; do mv "$x"... (7 Replies)
Discussion started by: jiapei100
7 Replies
5. Shell Programming and Scripting
So I have two files:
File1
pictures.txt 1.1 1.3
dance.txt 1.2 1.4
treehouse.txt 1.3 1.5
File2
pictures.txt 1.5 ref2313 1.4 ref2345 1.3 ref5432 1.2 ref4244
dance.txt 1.6 ref2342 1.5 ref2352 1.4 ref0695 1.3 ref5738 1.2 ref4948 1.1
treehouse.txt 1.6 ref8573 1.5 ref3284 1.4 ref5838... (24 Replies)
Discussion started by: linuxkid
24 Replies
6. UNIX for Dummies Questions & Answers
:confused:
hi all,
I need to delete all the files from a archieve directory whose filename
starts with 2008, 2009. The folder consists of 2008, 2009, 2010 and 2011.
the filename example is as below:
20081111_12_asc_ac_st.zip similarly there are files for 2009.
There are around... (2 Replies)
Discussion started by: abhi_123
2 Replies
7. Shell Programming and Scripting
Hi Friends,
I am new to this , I am working on AIX system and my scenario is to retrive the files from remote system and remove the files from the remote system after retreving files. I can able to retrieve the files but Can't remove files in remote system. Please check my code and help me out... (3 Replies)
Discussion started by: vinayparakala
3 Replies
8. Shell Programming and Scripting
Hi all, I have developed a shell script to copy the files from source to destination and simultaneously to delete the copied files in source. I can copy the files but the files cannot be deleted in source side. (3 Replies)
Discussion started by: Venkatesan
3 Replies
9. Shell Programming and Scripting
Hi,
I have 200 pictures in a folder and I would like move 10 random pictures every week to given folder automatically.
I have this server on 1and1.com.
So I tried the following using Bash script for manual copy and paste for testing
#!/bin/bash
mapfile -t -n 3 files < <(find... (13 Replies)
Discussion started by: raamkum
13 Replies
10. Shell Programming and Scripting
#!/bin/bash
#
name=$1
type=$2
number=1
for file in ./**
do
if
then
filenumber=00$number
elif
then
filenumber=0$number
fi
tempname="$name""$filenumber"."$type"
if (4 Replies)
Discussion started by: TheGreatGizmo
4 Replies
LEARN ABOUT DEBIAN
class::methodmaker::optext
Class::MethodMaker::OptExt(3pm) User Contributed Perl Documentation Class::MethodMaker::OptExt(3pm)
NAME
Class::MethodMaker::OptExt - Constants for C::MM's option extension mechanism
SYNOPSIS
This class is internal to Class::MethodMaker and should not be used by any clients. It is not part of the public API.
DESCRIPTION
This class contains the constants used by Class::MethodMaker to determine the names of its methods dependent upon options invoked.
CLASS CONSTANTS
OPTEXT
OPTEXT is a map from options that are implemented as method extensions to the option parameters.
Parameter keys are:
encode
code number (to allow the option combination to be encoded whilst keeping the length of the subr name no more than 8 chars). encode is
required for all opts (for determining method extension), and must be a power of two.
refer
Code for referring to storage (default: '$_[0]->{$name}').
decl
Code for declaring storage.
postac
Code to execute immediately after any assignment check --- for example, to initialize storage if necessary
asgnchk
Code for checking assignments.
defchk
Code for default checking.
reset
Code to execute when resetting an element
read
Code to execute each time an value is read
store
Code to execute each time a value is stored
CLASS COMPONENTS
CLASS HIGHER-LEVEL FUNCTIONS
encode
Take a set of options, return a two-letter code being the extension to add to the method to incorporate the extensions, and a list
(arrayref) of the extensions represented.
SYNOPSIS
my ($ext, $opt) =
Class::MethodMaker::OptExt->encode([qw( static type foobar )]);
ARGUMENTS
options
The options to encode, as an arrayref of option names
RETURNS
ext A code (string) to append to a methodname to represent the options used.
opts
The options represented by the ext . This is generally a subset of the of those provided in options, for not all general options
are handled by an encoded methodname.
CLASS HIGHER-LEVEL PROCEDURES
INSTANCE CONSTRUCTION
INSTANCE COMPONENTS
INSTANCE HIGHER-LEVEL FUNCTIONS
INSTANCE HIGHER-LEVEL PROCEDURES
EXAMPLES
BUGS
REPORTING BUGS
Email the development mailing list "class-mmaker-devel@lists.sourceforge.net".
AUTHOR
Martyn J. Pearce
COPYRIGHT
Copyright (c) 2003 Martyn J. Pearce. This program is free software; you can redistribute it and/or modify it under the same terms as Perl
itself.
SEE ALSO
perl v5.14.2 2011-02-28 Class::MethodMaker::OptExt(3pm)