05-24-2012
Deleting particular files with a numerical suffix
Hello
I have a directory with a list of files which have a particular numerical suffix.
E.g
filename_0
filename_1
filename_18500
filename_10000
I want to delete all files from this directory which have a filename which have a numerical suffix greater than 10540.
So any files with a filename greater than filename_10540.
Thanks
Kamal
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I'm trying to write a ksh script to copy a specified number of files from one directory to another.
The files are named in the convention <switchname>_log.<num> and the numbers are sequential single digit onwards. I figured I could find some parameter for ls which would list the files in... (3 Replies)
Discussion started by: Steve_H
3 Replies
2. Programming
Hi I was hoping that maybe someone could help me with a small piece of C code. I have a number of files, which are all of similar layout ie. three lines of text and 5-6 columns of numerical data. I need to add each of the elements of the second column in one file to their counterparts in the second... (17 Replies)
Discussion started by: Boucho
17 Replies
3. UNIX for Dummies Questions & Answers
Hi,
There are multiple files like
file1_11
file2_11
file3_11.....and so on.
How to rename them such tht the suffix _11 is removed and they become file1, file2, file3.
Any help is appreciated.
Regards
er_ashu (1 Reply)
Discussion started by: er_ashu
1 Replies
4. Shell Programming and Scripting
Hi everyone,
I would love to have a script that does the following:
I have one file that looks like that:
ATOM 1 BB SER 1 1 -31.958 -25.125 -11.061 1.00 0.00
ATOM 3 BB GLY 1 2 -32.079 -26.085 -14.466 1.00 0.00
ATOM 4 BB VAL 1 3 ... (1 Reply)
Discussion started by: s-layer
1 Replies
5. Shell Programming and Scripting
if I want to search those files which were suffix with .c,
I can use find ./ -name *.c
but how to find out those files which were not suffix with .c ??
Thanks a lot! (2 Replies)
Discussion started by: cqlouis
2 Replies
6. UNIX for Dummies Questions & Answers
how do we delete files based on the suffix??? (1 Reply)
Discussion started by: saggiboy10
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a large number of files which are named as follows.
VF_50, VF_100, VF_150, VF_250, VF_300, VF_350, VF_400, VF_450, VF_500.
When I do an 'ls' it arranges the files in the following way
VF_100, VF_150, VF_250, VF_300, VF_350, VF_400, VF_450, VF_50, VF_500.
Is there a way to... (2 Replies)
Discussion started by: lost.identity
2 Replies
8. Shell Programming and Scripting
Hi,
I have a lot of files similar to the below order. I want to rename all the files .discrading the time stamp/numbers after cnf.
Existing files
id_info_20130405.cnf_20130801
in_info_20130405.cnf_20130891
iz_info_20130405.cnf_20130821
in_info_20130405.cnf_20130818... (2 Replies)
Discussion started by: saravanapandi
2 Replies
9. Shell Programming and Scripting
I am trying to build a list of all files ending in *.cbl in the system, but when I try find / -name *.cbl, I only find one specific file name that is alphabetically first. Is there something I'm missing?
TIA
---------- Post updated at 11:20 AM ---------- Previous update was at 11:15 AM... (1 Reply)
Discussion started by: wbport
1 Replies
10. Shell Programming and Scripting
Hello,
First time poster. I am looking for a way to script or program the process of moving files from one folder to another, automatically, based on the count of files in the destination folder.
I was thinking a shell script would work, but am open to the suggestions of the experts... (6 Replies)
Discussion started by: comtech
6 Replies
LEARN ABOUT PLAN9
mkfontscale
MKFONTSCALE(1) General Commands Manual MKFONTSCALE(1)
NAME
mkfontscale - create an index of scalable font files for X
SYNOPSIS
mkfontscale [ -b ] [ -s ] [ -o filename ] [ -x suffix ] [ -a encoding ] ... [ -f fuzz ] [ -l ] [ -e directory ] [ -p prefix ] [ -r prefix ]
[ -n prefix ] [ -- ] [ directory ] ...
DESCRIPTION
For each directory argument, mkfontscale reads all of the scalable font files in the directory. For every font file found, an X11 font
name (XLFD) is generated, and is written together with the file name to a file fonts.scale in the directory.
The resulting fonts.scale file should be checked and possibly manually edited before being used as input for the mkfontdir(1) program.
OPTIONS
-b read bitmap fonts. By default, bitmap fonts are ignored.
-s ignore scalable fonts. By default, scalable fonts are read. If -b is set, this flag has the side effect of enabling the reading of
fonts.scale files.
-o filename
send program output to filename; default is fonts.scale if bitmap fonts are not being read, and fonts.dir if they are. If filename
is relative, it is created in the directory being processed. If it is the special value -, output is written to standard output.
-x suffix
exclude all files with the specified suffix.
-a encoding
add encoding to the list of encodings searched for.
-f fuzz
set the fraction of characters that may be missing in large encodings to fuzz percent. Defaults to 2%.
-l Write fonts.dir files suitable for implementations that cannot reencode legacy fonts (BDF and PCF). By default, it is assumed that
the implementation can reencode Unicode-encoded legacy fonts.
-e specifies a directory with encoding files. Every such directory is scanned for encoding files, the list of which is then written to
an "encodings.dir" file in every font directory.
-p Specifies a prefix that is prepended to the encoding file path names when they are written to the "encodings.dir" file. The prefix
is prepended literally: if a `/' is required between the prefix and the path names, it must be supplied explicitly as part of the
prefix.
-r Keep non-absolute encoding directories in their relative form when writing the "encodings.dir" file. The default is to convert rel-
ative encoding directories to absolute directories by prepending the current directory. The positioning of this options is signifi-
cant, as this option only applies to subsequent -e options.
-n do not scan for fonts, do not write font directory files. This option is useful when generating encoding directories only.
-- end of options.
SEE ALSO
X(7), Xserver(1), mkfontdir(1), ttmkfdir(1), xfs(1), xset(1)
NOTES
The format of the fonts.scale, fonts.dir and encodings.dir files is documented in the mkfontdir(1) manual page.
Mkfontscale will overwrite any fonts.scale file even if it has been hand-edited.
mkfontscale -b -s -l is equivalent to mkfontdir.
AUTHOR
The version of mkfontscale included in this X.Org Foundation release was originally written by Juliusz Chroboczek <jch@freedesktop.org> for
the XFree86 project. The functionality of this program was inspired by the ttmkfdir utility by Joerg Pommnitz.
X Version 11 mkfontscale 1.1.0 MKFONTSCALE(1)