Using find in a directory containing large number of files
Hi All,
I have searched this forum for related posts but could not find one that fits mine. I have a shell script which removes all the XML tags including the text inside the tags from some 4 million XML files.
The shell script looks like this (MODIFIED):
Previously, the shell script looked like this (ORIGINAL):
Since, ls gives "Argument list too long" message, so after searching through this forum I could do some modifications to my ORIGINAL to come up with the MODIFIED version (above). But the MODIFIED version does not seem to work.
I have a task to move more than 35000 files every two hours, from the same directory to another directory based on a file that has the list of filenames
I tried the following logics
(1)
find . -name \*.dat > list
for i in `cat list` do mv $i test/ done
(2)
cat list|xargs -i mv "{}"... (7 Replies)
Hi all;
I'm having a problem when want to list a large number of files in current directory using find together with the prune option.
First i used this command but it list all the files including those in sub directories:
find . -name "*.dat" | xargs ls -ltr
Then i modified the command... (2 Replies)
Hi,
i have more than 1000 data files(.txt) like this
first file format:
178.83 554.545
179.21 80.392
second file:
178.83 990.909
179.21 90.196
etc.
I want to combine them to the following format:
178.83,554.545,990.909,...
179.21,80.392,90.196,... (7 Replies)
Hellow i have a large number of files that i want to concatenate to one. these files start with the word 'VOICE_' for example
VOICE_0000000000
VOICE_1223o23u0
VOICE_934934927349
I use the following code:
cat /ODS/prepaid/CDR_FLOW/MEDIATION/VOICE_* >> /ODS/prepaid/CDR_FLOW/WORK/VOICE
... (10 Replies)
Hi Forum.
I was trying to search the following scenario on the forum but was not able to.
Let's say that I have a very large file that has some bad data in it (for ex: 0.0015 in the 12th column) and I would like to find the line number and remove that particular line.
What's the easiest... (3 Replies)
Hi. I need to delete a large number of files listed in a txt file. There are over 90000 files in the list. Some of the directory names and some of the file names do have spaces in them.
In the file, each line is a full path to a file:
/path/to/the files/file1
/path/to/some other/files/file 2... (4 Replies)
Hi!
I just want to count number of files in a directory, and write to new text file, with number of files and their name
output should look like this,,
assume that below one is a new file created by script
Number of files in directory = 25
1. a.txt
2. abc.txt
3. asd.dat... (20 Replies)
Want to sftp large number of files ... approx 150 files will come to server every minute. (AIX box)
Also need make sure file has been sftped successfully...
Please let me know :
1. What is the best / faster way to transfer files?
2. should I use batch option -b so that connectivity will be... (3 Replies)
Hi.
I found many scripts in the web of achieving this.
But I like to use this one
find /EDWH-DMT03 -xdev -size +10000 -exec ls -la {} \;|sort -n -k 5 > LARGE.rst
But the problem is, why it still list out files with 89 bytes as the output? Is there anything wrong with the command?
My... (7 Replies)
Discussion started by: aimy
7 Replies
LEARN ABOUT MINIX
ctags
CTAGS(1) General Commands Manual CTAGS(1)NAME
ctags - Generates "tags" and (optionally) "refs" files
SYNOPSIS
ctags [-stvra] filesnames...
DESCRIPTION
ctags generates the "tags" and "refs" files from a group of C source files. The "tags" file is used by Elvis' ":tag" command, control-]
command, and -t option. The "refs" file is sometimes used by the ref(1) program.
Each C source file is scanned for #define statements and global function definitions. The name of the macro or function becomes the name
of a tag. For each tag, a line is added to the "tags" file which contains:
- the name of the tag
- a tab character
- the name of the file containing the tag
- a tab character
- a way to find the particular line within the file.
The filenames list will typically be the names of all C source files in the current directory, like this:
$ ctags -stv *.[ch]
OPTIONS -t Include typedefs. A tag will be generated for each user-defined type. Also tags will be generated for struct and enum names.
Types are considered to be global if they are defined in a header file, and static if they are defined in a C source file.
-v Include variable declarations. A tag will be generated for each variable, except for those that are declared inside the body of a
function.
-s Include static tags. Ctags will normally put global tags in the "tags" file, and silently ignore the static tags. This flag causes
both global and static tags to be added. The name of a static tag is generated by prefixing the name of the declared item with the
name of the file where it is defined, with a colon in between. For example, "static foo(){}" in "bar.c" results in a tag named
"bar.c:foo".
-r This causes ctags to generate both "tags" and "refs". Without -r, it would only generate "tags".
-a Append to "tags", and maybe "refs". Normally, ctags overwrites these files each time it is invoked. This flag is useful when you
have to many files in the current directory for you to list them on a single command-line; it allows you to split the arguments
among several invocations.
FILES
tags A cross-reference that lists each tag name, the name of the source file that contains it, and a way to locate a particular line in
the source file.
refs The "refs" file contains the definitions for each tag in the "tags" file, and very little else. This file can be useful, for exam-
ple, when licensing restrictions prevent you from making the source code to the standard C library readable by everybody, but you
still everybody to know what arguments the library functions need.
BUGS
ctags is sensitive to indenting and line breaks. Consequently, it might not discover all of the tags in a file that is formatted in an
unusual way.
SEE ALSO elvis(1), refs(1)AUTHOR
Steve Kirkendall
kirkenda@cs.pdx.edu
CTAGS(1)