Sponsored Content
Top Forums Shell Programming and Scripting how to remove files with only numbers as file names? Post 302120492 by aigles on Wednesday 6th of June 2007 04:52:42 PM
Old 06-06-2007
With ksh and bash (option extglob set) you can list and remove the files with the command :
Code:
$ ls +([0-9])
$ rm +([0-9])

Jean-Pierre.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove spaces between file names

Hi All, I have spaces in between file names. "Material Header.txt" "Customer Header.txt" "Vendor Header.txt" And how can I remove spaces between file names like below MaterialHeader.txt CustomerHeader.txt VendorHeader.txt Thanks Srimitta (10 Replies)
Discussion started by: srimitta
10 Replies

2. UNIX for Dummies Questions & Answers

How to select only those file names whose name contains only numbers.

Hi Guru's, Before writing to this forum I have searched extensively on this forum about my problem. I have to write a shell script which takes out only those file names from the given directory which contains only numbers. For example, In the given directory these files are present: ... (0 Replies)
Discussion started by: spranm
0 Replies

3. UNIX for Advanced & Expert Users

How to select only those file names whose name contains only numbers

Hi Guru's, Before writing to this forum I have searched extensively on this forum about my problem. I have to write a shell script which takes out only those file names from the given directory which contains only numbers. For example, In the given directory these files are present: ... (4 Replies)
Discussion started by: spranm
4 Replies

4. Shell Programming and Scripting

Finding consecutive numbers in version names on a txt file

Hi all. I have a directory which contains files that can be versioned. All the files are named according to a pattern like this: TEXTSTRING1-001.EXTENSION TEXTSTRING2-001.EXTENSION TEXTSTRING3-001.EXTENSION ... TEXTSTRINGn-001.EXTENSION If a file is versioned, a file called ... (10 Replies)
Discussion started by: fox1212
10 Replies

5. Shell Programming and Scripting

Shell Scripts (Renaming file names with sequential numbers)

Hi there, Firstly, I have no experience with shell scripts so would really appreciate some help. I have the following shell script that is causing some problems: moveit() { && set -x if then DOUBLE_DELIVERY=$(grep... (6 Replies)
Discussion started by: thebeno
6 Replies

6. Shell Programming and Scripting

How to remove common file names from text files

I'm running on freebsd -- with a default shell of csh. I have two files named A and B. Each line of each file contains a file name. How can I write a script that removes all the file names in file B from A. I tried to use perl to create a huge regular expression with "|" separating the file... (2 Replies)
Discussion started by: siegfried
2 Replies

7. Shell Programming and Scripting

Print numbers along with file names.

Hi All, I have some thousand files with names like 1.syl, 2.syl, 5.syl etc. These files contain one sentence each. I want to store all those sentences along with the file ID that is 1, 2, 5 with the sentences they contain. For example, 1.syl has this is a test line 2.syl has ... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

8. Shell Programming and Scripting

Using awk to append incremental numbers to the end of duplicate file names.

I'm currently working on a script that extracts files from a .zip, runs an sha1sum against them and then uses awk to pre-format them into zomething more readable thusly: Z 69 89e013b0d8aa2f9a79fcec4f2d71c6a469222c07 File1 Z 69 6c3aea28ce22b495e68e022a1578204a9de908ed File2 Z 69... (5 Replies)
Discussion started by: Ethereal
5 Replies

9. Shell Programming and Scripting

Exclude certain file names while selectingData files coming in different names in a file name called

Data files coming in different names in a file name called process.txt. 1. shipments_yyyymmdd.gz 2 Order_yyyymmdd.gz 3. Invoice_yyyymmdd.gz 4. globalorder_yyyymmdd.gz The process needs to discard all the below files and only process two of the 4 file names available ... (1 Reply)
Discussion started by: dsravanam
1 Replies

10. Shell Programming and Scripting

Remove all files with specific file names in directory

If I have 5 files in a directory, what is the best way to remove specific files in it? For example, snps.ivg probes.ivg Desired output probes.ivg probes.txt all.txt Basically, removing those files with "snp" in the filename regardless of extension. Thank you :). (2 Replies)
Discussion started by: cmccabe
2 Replies
aoe-mkdevs(8)						      System Manager's Manual						     aoe-mkdevs(8)

NAME
aoe-mkdevs - create special device files for aoe driver SYNOPSIS
aoe-mkdevs {device-dir} env n_partitions=1 aoe-mkdevs {device-dir} DESCRIPTION
The aoe-mkdevs command is deprecated in favor of udev. Systems with udev do not need to use the aoe-mkdevs or aoe-mkself commands, because udev will create device nodes as needed. Systems without udev use aoe-mkdevs to create the character special files necessary to control the aoe driver. The aoe-mkdevs command uses aoe-mkshelf to also create block special files. The aoe drivers after version 49 support dynamic minor device numbers so that a greater number of devices can be supported. The aoe-mkdevs command is incompatible with dynamic device numbers. If your system lacks udev, and you are using an aoe driver version 50 or above, use the aoe_dyndevs=0 module option to force the aoe driver to use static device numbers. If you are not using dynamic device numbers, and you built your aoe driver to support only one partition per device (whole-disk parti- tions), then the device files must match, and you should use the n_partitions environment variable described below. Arguments device-dir This should be the name of the directory where the special device files will be created. ENVIRONMENT VARIABLES
If the n_partitions variable is set in the environment, it will override the default number of partitions per aoe disk, namely 16. EXAMPLE
In this example, the root user on a host named nai creates special files for using the aoe disks in shelf 7. After remembering that the driver doesn't have partition support, this sysadmin gets rid of the mismatching device nodes and calls aoe-mkdevs again with n_partitions set to 1. nai:~# rm -rf /dev/etherd nai:~# aoe-mkdevs /dev/etherd nai:~# ls /dev/etherd | wc -l 1603 nai:~# rm -rf /dev/etherd nai:~# n_partitions=1 aoe-mkdevs /dev/etherd nai:~# ls /dev/etherd | wc -l 103 SEE ALSO
aoe-discover(8), aoe-interfaces(8), aoe-mkshelf(8), aoe-stat(8), aoetools(8), udev(7). AUTHOR
Ed L. Cashin (ecashin@coraid.com) aoe-mkdevs(8)
All times are GMT -4. The time now is 08:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy