08-08-2011
Hi
"ls -1 " and "find . " are not the same. find will get files from folders within the current directory as well, if it finds any.
Guru.
This User Gave Thanks to guruprasadpr For This Post:
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: bryan
7 Replies
2. UNIX for Dummies Questions & Answers
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)
Discussion started by: ashikin_8119
2 Replies
3. Shell Programming and Scripting
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)
Discussion started by: mr_monocyte
7 Replies
4. Shell Programming and Scripting
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)
Discussion started by: chriss_58
10 Replies
5. Shell Programming and Scripting
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)
Discussion started by: pchang
3 Replies
6. UNIX for Dummies Questions & Answers
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)
Discussion started by: inakajin
4 Replies
7. Shell Programming and Scripting
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)
Discussion started by: Akshay Hegde
20 Replies
8. Shell Programming and Scripting
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)
Discussion started by: vegasluxor
3 Replies
9. Shell Programming and Scripting
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 SUSE
xml::parser::style::stream
Parser::Style::Stream(3) User Contributed Perl Documentation Parser::Style::Stream(3)
NAME
XML::Parser::Style::Stream - Stream style for XML::Parser
SYNOPSIS
use XML::Parser;
my $p = XML::Parser->new(Style => 'Stream', Pkg => 'MySubs');
$p->parsefile('foo.xml');
{
package MySubs;
sub StartTag {
my ($e, $name) = @_;
# do something with start tags
}
sub EndTag {
my ($e, $name) = @_;
# do something with end tags
}
sub Characters {
my ($e, $data) = @_;
# do something with text nodes
}
}
DESCRIPTION
This style uses the Pkg option to find subs in a given package to call for each event. If none of the subs that this style looks for is
there, then the effect of parsing with this style is to print a canonical copy of the document without comments or declarations. All the
subs receive as their 1st parameter the Expat instance for the document they're parsing.
It looks for the following routines:
o StartDocument
Called at the start of the parse .
o StartTag
Called for every start tag with a second parameter of the element type. The $_ variable will contain a copy of the tag and the %_
variable will contain attribute values supplied for that element.
o EndTag
Called for every end tag with a second parameter of the element type. The $_ variable will contain a copy of the end tag.
o Text
Called just before start or end tags with accumulated non-markup text in the $_ variable.
o PI
Called for processing instructions. The $_ variable will contain a copy of the PI and the target and data are sent as 2nd and 3rd
parameters respectively.
o EndDocument
Called at conclusion of the parse.
perl v5.12.1 2003-07-27 Parser::Style::Stream(3)