Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Move a TXT file greater or equal 355 MB with its corresponding .LST file Post 303043340 by alexcol on Saturday 25th of January 2020 04:26:46 AM
Old 01-25-2020
Move a TXT file greater or equal 355 MB with its corresponding .LST file

Good morning, i need your help please
I need to move a .TXT file greater or igual 355 MB and its correspondent .LST file in a non recursive way

The operating system is:

Code:
uname -a
SunOS server01c 5.10 Generic_144488-01 sun4u sparc SUNW,SPARC-Enterprise

For example:

Code:
rw-r--r--   1 xptol    explotacion    355M Jan 25 03:54 NS6142SCA20200125033624.TXT
-rw-r--r--   1 xptol    explotacion       7 Jan 25 03:54 NS6142SCA20200125033624.LST

I could identify the file with the find command

Code:
find . ! -name . -prune -name 'NS6142*' -size +355000000c -print

Output;
Code:
NS6142SCA20200125033624.TXT

because every file is transmitted ever 20 minutes i need to loop but i dont know how to get around to move the 355 MB .TXT file which its correspondebt .LST file

Code:
while true
do
 sleep 2400
 find . ! -name . -prune -name 'NS6142*' -size +355000000c -exec mv {} target_dir \; 
 --identify .lST file and move to target_dir
done

or is there a better way to get around this, i wiil appreciate your help

Thanks for your help in advanced
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl how to move pointer to previous line in a txt file?

I have a text file that has blocks of text. Each block starts with ### and ends with End_###. I wrote a perl script to search a string from line 2 (ignore any line starts with ###) of each block if matched, need to print that whole block. According to the input file in below, it will print... (5 Replies)
Discussion started by: tqlam
5 Replies

2. UNIX for Dummies Questions & Answers

Binary txt file received when i use uuencode to send txt file as attachment

Hi, I have already read a lot of posts on sending attachments in unix...but none of them were of help for my problem...so here goes.. i wanna attach a text file and send to a mail id..used the following code : uuencode "$File1" "$File1" ;|mail -s "$Mail_sub" abc@abc.com it works... (2 Replies)
Discussion started by: ash22
2 Replies

3. Shell Programming and Scripting

Trying to find files equal to and greater than

Hi Guys and Gals, I'm having some difficulty putting this check into a shell script. I would like to search a particular directory for a number of files. The logic I have is pretty simple: Find file named *.txt that are newer than <this file> and count them If the number of files is equal to... (4 Replies)
Discussion started by: bbbngowc
4 Replies

4. Shell Programming and Scripting

Problem with Greater Than Or Equal To

BASH problem with IS GREATER THAN OR EQUAL TO. I have tried a dozen variations for this IF statement to work with IS GREATER THAN OR EQUAL TO. My code below WORKS. array=( $( /usr/bin/sar -q 1 30 |grep Average |awk '{print $2,$3}' ) ) nthreads="${array}" avproc="${array}" if && ; then ... (6 Replies)
Discussion started by: diex
6 Replies

5. Shell Programming and Scripting

Move txt file to with current date appended to filename

I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>" So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (1 Reply)
Discussion started by: johannd
1 Replies

6. UNIX for Dummies Questions & Answers

Move txt file to with current date appended to filename

I have multiple txt files which begin with the word "orders" in folder C:\source. I need to move the files to folder C:\dest and rename them to "process_<date>_<count>" So for example , if there are 3 files ordersa.txt , ordersb.txt and ordersc.txt in C:\source , after running the script I want... (7 Replies)
Discussion started by: johannd
7 Replies

7. UNIX for Dummies Questions & Answers

Missing menu.lst file in Ubuntu

I am not able to find menu.lst in /boot. During the Linux Kernel Compilation I installed the kernel using make install. Next I created an initrd image. I had to modify the Grub configuration file - /boot/grub/menu.lst which I am not able to find. Any resolution for the issue? (3 Replies)
Discussion started by: rupeshkp728
3 Replies

8. UNIX for Dummies Questions & Answers

look for file size greater than "0" of specific pattern and move those to another directory

Hi , i have some files of specific pattern ...i need to look for files which are having size greater than zero and move those files to another directory.. Ex... abc_0702, abc_0709, abc_782 abc_1234 ...etc need to find out which is having the size >0 and move those to target directory..... (7 Replies)
Discussion started by: dssyadav
7 Replies

9. Windows & DOS: Issues & Discussions

2 Questions: replace text in txt file, add text to end of txt file

so... Lets assume I have a text file. The text file contains multiple "#" symbols. I want to replace all thos "#"s with a STRING using DOS/Batch I want to add a certain TEXT to the end of each line. How can I do this WITHOUT aid of sed, grep or anything linux related ? (1 Reply)
Discussion started by: pasc
1 Replies

10. UNIX for Beginners Questions & Answers

Compare first column from two csv files with greater than or equal, and less than

I have two csv files of different sizes. The output file needs to have file1 contents on top of file2 contents where file2 col1 is >= to file1 col1, and file2 col1(same value) is < file1 col1 (next value). So basically, some file2 rows will be matched to the same file1 row because it is the closet... (7 Replies)
Discussion started by: aachave1
7 Replies
opendkim-genkey(8)					      System Manager's Manual						opendkim-genkey(8)

NAME
opendkim-genkey - DKIM filter key generation tool SYNOPSIS
opendkim-genkey [options] DESCRIPTION
opendkim-genkey generates (1) a private key for signing messages using opendkim(8) and (2) a DNS TXT record suitable for inclusion in a zone file which publishes the matching public key for use by remote DKIM verifiers. The filenames of these are based on the selector (see below); the private key will have a suffix of ".private" and the TXT record will have a suffix of ".txt". OPTIONS
-a Appends the domain name (see -d below) to the label in the generated TXT record, followed by a trailing period. By default it is assumed the domain name is implicit from the context of the zone file, and is therefore not included in the output. -b bits Specifies the size of the key, in bits, to be generated. The default is 1024 which is the value recommended by the DKIM specifica- tion. -d domain Names the domain which will use this key for signing. Currently only used in a comment in the TXT record file. The default is "example.com". -D directory Instructs the tool to change to the named directory prior to creating files. By default the current directory is used. -h algorithms Specifies a list of hash algorithms which can be used with this key. By default all hash algorithms are allowed. -n note Includes arbitrary note text in the key record. By default, no such text is included. -r Restricts the key for use in e-mail signing only. The default is to allow the key to be used for any service. -s selector Specifies the selector, or name, of the key pair generated. The default is "default". -S Disallows subdomain signing by this key. By default the key record will be generated such that verifiers are told subdomain signing is permitted. -t Indicates the generated key record should be tagged such that verifiers are aware DKIM is in test at the signing domain. NOTES
Requires that the openssl(8) binary be installed and in the executing shell's search path. VERSION
This man page covers the version of opendkim-genkey that shipped with version 2.6.8 of OpenDKIM. COPYRIGHT
Copyright (c) 2007, 2008 Sendmail, Inc. and its suppliers. All rights reserved. Copyright (c) 2009, 2011, 2012, The OpenDKIM Project. All rights reserved. SEE ALSO
opendkim(8), openssl(8) RFC6376 - DomainKeys Identified Mail The OpenDKIM Project opendkim-genkey(8)
All times are GMT -4. The time now is 02:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy