Search Results

Search: Posts Made By: Saidul
8,099
Posted By Don Cragun
Note that unless you happen to be sitting in...
Note that unless you happen to be sitting in /home/emd/Desktop when you run this script, mkdir will create 1234 in whatever directory you're sitting in; not necessarily /home/emd/Desktop.

It has...
8,099
Posted By SriniShoo
find /home/emd/Desktop/n007/M007/ -type f -name...
find /home/emd/Desktop/n007/M007/ -type f -name "A2014*" -print0 | xargs -0 cp -t /home/emd/Desktop/1234
8,099
Posted By RudiC
If you use the -0 option to xargs, you need to...
If you use the -0 option to xargs, you need to -print0 from find. And, the {} in xargs works only if you specified the replace_string with the -I option.
2,514
Posted By Chubler_XL
Try this wildcard A20140205.1[3-8]* edit: ...
Try this wildcard A20140205.1[3-8]*

edit: You can avoid the need for touch and xargs buy getting tar to read filenames from stdin

find /tmp/data -type f -name "A20140205.1[3-8]*" | tar -c -v...
3,458
Posted By Don Cragun
Yes, obviously. It must be past my bed time...
Yes, obviously. It must be past my bed time...
3,458
Posted By MadeInGermany
Or simply -print { date +"Following files...
Or simply -print
{
date +"Following files removed at %c:"
find /tmp/test/CC[12]* /tmp/file/Int* -type f -mtime +3 -exec rm -f {} + -print
} > rm.log
3,458
Posted By Don Cragun
First, note that putting these three commands on...
First, note that putting these three commands on one line with no command separator will NOT do what you want.
Second, you don't need to invoke find three times to do this (unless you run into...
3,458
Posted By MadeInGermany
It works! You'll get errors if there are...
It works!
You'll get errors if there are sub-directories. These can be suppressed by -type f or ! -type d.
Further, Unix find offers + instead of \; for -exec; if the command supports multiple...
3,241
Posted By CarloM
-eq is a numeric comparison. Use = for strings: ...
-eq is a numeric comparison. Use = for strings:

if [ "$Dt" = Default ];
2,819
Posted By Don Cragun
If script.sh contains your function definition...
If script.sh contains your function definition and the following:
if [ $# -eq 1 ]
then # Use given argument as copy date:
copy_date="$1"
else # Use yesterday as copy date:
...
2,888
Posted By CarloM
16:00:00 to 16:00:30, or to 16:30:00? You only...
16:00:00 to 16:00:30, or to 16:30:00? You only have 1 value every 5 minutes in your example, so 30 second averages would be a bit odd.

Assuming it's half-hourly, you could do something like:
$...
2,888
Posted By RudiC
Not sure what you need explained, so here's it...
Not sure what you need explained, so here's it all:awk '/^..:[0-5][05]/ {split($1,ti,":") # if the record starts with any two chars:00 - 55 in 05 increments
...
Showing results 1 to 12 of 12

 
All times are GMT -4. The time now is 05:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy