01-08-2017
no. unfortunately I have a variable amount of files to process 3000-5000. This would mean adding a loop to copy in batches which is an ugly solution.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Trying to tar specific files from a directory causes problems when the number of files is too large.
ls ~/logs | wc -l
5928
In the logs directory - I have 5928 files
If I want to include all files with today's date - I run the following command
tar cf ~/archive/LoadLogs_20060302.tar... (8 Replies)
Discussion started by: dad5119
8 Replies
2. Shell Programming and Scripting
Hi,
I have a requirement where I need to TAR more than 50K files.
Even though I can do TAR successfully on few 100s of files, but whenever Im trying to TAR the entire 50K files, I am getting the error message :
Argument List Too Long.
Please suggest how can i avoid this error.
Im... (2 Replies)
Discussion started by: unx100
2 Replies
3. Shell Programming and Scripting
Hi everyone,
I have a problem with my shell script. As a quick overview I need to change a template file 6561 times and copy the file into a new catalogue. Thanks to your forum I have managed to write a script to do so:
#!/bin/sh
template=$1
for values in {45,165,285}\ {45,165,285}\... (6 Replies)
Discussion started by: mario8eren
6 Replies
4. Shell Programming and Scripting
I have a wrote a script which consits of the below line.. Below of this script I'm getting this error "ksh: /usr/bin/ls: arg list too long"
The line is
log_file_time=`ssh -i $HOME/.ssh/id_rsa -q $i ls -lrt /bp/karthik/test/data/log/$abc*|tail -1|awk '{print $8}'`
And $abc alias is as "p |... (1 Reply)
Discussion started by: 22karthikreddy
1 Replies
5. Shell Programming and Scripting
I have a huge set of files (with extension .common) in my directory around 2 million. When I run this script on my Linux with BASH, I get /bin/awk: Argument list too long
awk -F'\t' '
NR == FNR { a=NR }
NR != FNR {
sub(".common", "", FILENAME)
print a, FILENAME, $1
}
'... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies
6. Shell Programming and Scripting
Dear Experts,
I have a list of 10K files in a directory. I am not able to execute any commands lile ls -lrt, awk, sed, mv, etc........
I wanna execute below command and get the output. How can I achieve it?? Pls help.
root# awk -F'|' '$1 == 1' file_20120710* | wc -l
/bin/awk: Argument list... (2 Replies)
Discussion started by: Naga06
2 Replies
7. Shell Programming and Scripting
Hi,
i am having some trouble with the below command, can some one suggest me the better way to do it.
grep -l 'ReturnCode=1' `find $Log -newer /tmp/Failed.tmp -print | xargs ls -ld | egrep SUB | egrep -ve 'MTP' -ve 'ABC' -ve 'DEF' -ve 'JKL' -ve 'XYZ' | awk '{print $9}'` > $Home1
Its... (2 Replies)
Discussion started by: Prateek007
2 Replies
8. Shell Programming and Scripting
Hi I am using find command --
find "directory1" -type f | xargs -i mv {} "directory2"
to avoid above argument list too long problem.
But, issue i am facing is directory1 is having subdirectories due to this i am facing directory traversal problem as i dont want to traverse subdirectories... (9 Replies)
Discussion started by: VSom007
9 Replies
9. UNIX for Advanced & Expert Users
Hi all,
I am using GNU sed (named gsed under macports) in OSX. I have a directory with a series of files named pool_01.jpg through pool_78802.jpg. I am trying to use this command to rename the files to their checksum + extension.
md5sum * | gsed -e 's/\(*\) \(.*\(\..*\)\)$/mv -v \2 \1\3/e'
... (3 Replies)
Discussion started by: openthomas
3 Replies
10. Shell Programming and Scripting
Hi Team,
Here's the situation.
I have approximately 300000 to 500000 jpg files in /appl/abcd/work_dir
mv /appl/abcd/work_dir /appl/abcd/process_dir
The above move command will work if the jpg files count is close to 50000 (not sure). If the count is less this mv command holds good. But if... (14 Replies)
Discussion started by: kmanivan82
14 Replies
LEARN ABOUT FREEBSD
dwarf_new_die
DWARF_NEW_DIE(3) BSD Library Functions Manual DWARF_NEW_DIE(3)
NAME
dwarf_new_die -- allocate a new debugging information entry
LIBRARY
DWARF Access Library (libdwarf, -ldwarf)
SYNOPSIS
#include <libdwarf.h>
Dwarf_P_Die
dwarf_new_die(Dwarf_P_Debug dbg, Dwarf_Tag tag, Dwarf_P_Die parent, Dwarf_P_Die child, Dwarf_P_Die left, Dwarf_P_Die right,
Dwarf_Error *err);
DESCRIPTION
Function dwarf_new_die() allocates a new DWARF debugging information entry and links it to another debugging information entry.
Argument dbg should reference a DWARF producer instance allocated using dwarf_producer_init(3) or dwarf_producer_init_b(3).
Argument tag should specify the tag of the newly created debugging information entry. Valid values for this argument are those for the
DW_TAG_* symbols defined in <libdwarf.h>.
Argument parent specifies the parent link of the debugging information entry.
Argument child specifies the first child link of the debugging information entry.
Argument left specifies the left sibling link of the debugging information entry.
Argument right specifies the right sibling link of the debugging information entry.
Only one of arguments parent, child, left and right is allowed to be non-NULL. Application code can subsequently call the function
dwarf_die_link(3) to change the links for the created debugging information entry.
If argument err is not NULL, it will be used to store error information in case of an error.
RETURN VALUES
On success, function dwarf_new_die() returns the newly created debugging information entry. In case of an error, function dwarf_new_die()
returns DW_DLV_BADADDR and sets the argument err.
ERRORS
Function dwarf_new_die() can fail with:
[DW_DLE_ARGUMENT] Argument dbg was NULL.
[DW_DLE_ARGUMENT] More than one of the arguments parent, child, left and right were non-NULL.
[DW_DLE_MEMORY] An out of memory condition was encountered during the execution of the function.
EXAMPLES
To create debugging information entries and add them to the producer instance, use:
Dwarf_P_Debug dbg;
Dwarf_P_Die die1, die2;
Dwarf_Error de;
/* ... assume dbg refers to a DWARF producer instance ... */
die1 = dwarf_new_die(dbg, DW_TAG_compilation_unit, NULL, NULL, NULL,
NULL, &de);
if (die1 == NULL) {
warnx("dwarf_new_die failed: %s", dwarf_errmsg(-1));
return;
}
die2 = dwarf_new_die(dbg, DW_TAG_base_type, die1, NULL, NULL,
NULL, &de);
if (die1 == NULL) {
warnx("dwarf_new_die failed: %s", dwarf_errmsg(-1));
return;
}
if (dwarf_add_die_to_debug(dbg, die1, &de) != DW_DLV_OK) {
warnx("dwarf_add_die_to_debug failed: %s", dwarf_errmsg(-1));
return;
}
SEE ALSO
dwarf(3), dwarf_add_die_to_debug(3), dwarf_die_link(3), dwarf_producer_init(3), dwarf_producer_init_b(3)
BSD
September 4, 2011 BSD