Sponsored Content
Top Forums Shell Programming and Scripting Find the original file size of encrypted file Post 303000784 by jim mcnamara on Wednesday 19th of July 2017 05:04:42 PM
Old 07-19-2017
Except that in order to write to a pipe the result has to be decrypted first.

I saw this request earlier and could not think of a way around the requirement of reading the entire file and decrypting the data.

It seems to me like you may not see what is really going on. rbatte's example is very good but it does open and read the file.

You could also decrypt the file to /tmp (tmpfs file system) which in solaris is actually memory manged by the kernel. Not disk. Very fast. Pipes can be implemented as shared memory objects as well. If you do that, delete all the files in /tmp as you go.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find the file by size

Hi, Can somebody PLEASE help me. Suppose I want to find a file which has largest no of bytes in a particular directory, How do i do that. ls -s will give the size of Blocks. But I want the largest sized file and in bytes or KB OR MB. tHANKS IN advanvce. Bye Rooh :( (1 Reply)
Discussion started by: rooh
1 Replies

2. Solaris

command to find out total size of a specific file size (spread over the server)

hi all, in my server there are some specific application files which are spread through out the server... these are spread in folders..sub-folders..chid folders... please help me, how can i find the total size of these specific files in the server... (3 Replies)
Discussion started by: abhinov
3 Replies

3. Shell Programming and Scripting

How to find size of a file

Hi, I have to directory /usr/inbound ------------- 10900.txt 10889.txt 109290202.txt I need to create inbound directory and i need to know size of these files one by one if file size is zero i need to print message like "empty file" Please help me how to solve this thanks krish. (4 Replies)
Discussion started by: kittusri9
4 Replies

4. Shell Programming and Scripting

find with file size and show the size

Hi All... is the below command be modified in sucha way that i can get the file size along with the name and path of the file the below command only gives me the file location which are more than 100000k...but I want the exact size of the file also.. find / -name "*.*" -size +100000k ... (3 Replies)
Discussion started by: rpraharaj84
3 Replies

5. Shell Programming and Scripting

The scripts not able to make the file to size 0, every times it go back to its original size

#!/bin/sh ########################################################################################################## #This script is being used for AOK application for cleaning up the .out files and zip it under logs directory. # IBM # Created #For pdocap201/pdoca202 .out files for AOK #1.... (0 Replies)
Discussion started by: mridul10_crj
0 Replies

6. UNIX for Dummies Questions & Answers

CSV file:Find duplicates, save original and duplicate records in a new file

Hi Unix gurus, Maybe it is too much to ask for but please take a moment and help me out. A very humble request to you gurus. I'm new to Unix and I have started learning Unix. I have this project which is way to advanced for me. File format: CSV file File has four columns with no header... (8 Replies)
Discussion started by: arvindosu
8 Replies

7. UNIX for Dummies Questions & Answers

How to know the Original size of the file without unzipping the File?

Hi, I don't have enough space on my Unix Box. So, I can't unzip the file and check the size of the file. So, I need to know, Is there any command, to check, how much the unzipped file takes after unzipping. Thanks in Advance. (4 Replies)
Discussion started by: Siva Sankar
4 Replies

8. Shell Programming and Scripting

Get original file size of zipped file

Hi, I have a process which creates files and gzip all the files. Next day, i need to get the file sizes ( before zip size ) of all the gzipped files. Is there any way i can get the original file sizes of gzipped files. Gunzipping the files, getting the file size and gzipping again is not the... (6 Replies)
Discussion started by: forums123456
6 Replies

9. UNIX for Advanced & Expert Users

How To Find GPG Keys In Encrypted File With Out Decrypting it?

Hello All, Is there a way to determine how many public keys are embedded or used to encrypt in a GPG file with out decrypting the actual encrypted file. I know i can see the keys & email id's used when we decrypt it, but curious to find a command if any to know with out decrypting the actual file... (2 Replies)
Discussion started by: Ariean
2 Replies
MIMEGPG(1)						      Double Precision, Inc.							MIMEGPG(1)

NAME
mimegpg - MIME-GPG utility SYNOPSIS
mimegpg [-s] [-E] [-e] [-c] [-d] [-p n] {--} {gpg options...} DESCRIPTION
The mimegpg tool signs, encrypts, or decrypts MIME-formatted E-mail messages using GnuPG. mimegpg does not contain any encryption code. It uses the GnuPG utility for all encryption and decryption functions. The -s option signs an E-mail message. The -E or the -e option encrypts the E-mail message. Specifying both -E/-e and -s encrypts and signs the E-mail message in a single step. The -d option decrypts the message. The -c option checks signatures. mimegpg works as a filter. It reads an E-mail message from standard input, which must be a MIME-formatted message. mimegpg signs, encrypts, and/or decrypts the message; then writes the encrypted, signed, or decrypted MIME message on standard output. The standard input to mimegpg must be a MIME E-mail message, with a "Mime Version: 1.0" header - even if the message does not contain any attachments. If the message contains any attachments, they are also signed and/or encrypted, individually. mimegpg automatically runs GnuPG, with the required options. mimegpg's options may also be followed by a single -- option; any remaining command line options are passed as additional options to GnuPG. The -E/-e option usually requires at least one -r GnuPG option, which may be specified in this fashion. The -p option specifies a file descriptor that contains any required passphrase. Any other valid GnuPG options may follow a double-dash, "--", as long as it makes sense for this operation (note that mimegpg automatically adds any GnuPG options that are needed to perform the given operation). The "--no-tty" option can be useful when mimegpg is used in a non-interactive mode. As always, secret keys that are password-protected secret keys cannot be used in the --no-tty mode, unless the -p option is used. SIGNING AND ENCRYPTING MESSAGES Use the -s option to sign MIME message content. Use the -E option to encrypt it. Use both options to both sign and encrypt. Follow with --, then any other GnuPG options. The -E option will require at least one -r GnuPG option. The -E option encapsulates the message content and all the attachments into a single encrypted MIME object. Some mail software cannot handle encapsulated content. The -e option encrypts each attachment separately, without encapsulation. If a secret key used for signing is password protected, the prompt to enter the password will be issued directly by GnuPG. Note that the -s and the -e (but not -E) options may issue multiple password prompts in interactive mode. mimegpg runs GnuPG multiple times if the MIME message contains attachments. GnuPG will be invoked separately for each attachment in the MIME message, and each invocation will prompt for any required key password. Note that the initial message headers are not signed and/or encrypted, except for the MIME headers themselves. However, any message/rfc822 MIME content - attached messages - are encrypted/signed in their entirety, headers and content. DECRYPTING AND CHECKING SIGNATURES The -d option attempts to decrypt any encrypted content in a MIME message. The -c option attempts to verify signatures of any signed content. Both -c and -d can be specified at the same time. -d looks for any multipart/encrypted MIME content, then attempts to decrypt it. -c looks for any multipart/signed MIME content, then attempts to verify the signature. The -c and -d options replace the multipart/signed and multipart/encrypted MIME content with a multipart/x-mimepgp section, that contains an additional attribute called "xpgpstatus". The value of the attribute is set to the exit code of GnuPG. Succesfully decrypting the message and/or verifying the signature sets the exit code to 0. A non-zero exit code indicates that the signature could not be verified, or the message could not be decrypted. The first section in this multipart/x-mimepgp is a text/plain section that contains any messages from GnuPG. The second section is any decrypted or signed content. mimegpg will include the signed content even if the signature could not be verified (check xpgpstatus). Encrypted content that could not be decrypted will not be included (obviously). Note - any existing x-mimegpg MIME section will have its content-type quietly reset to multipart/mixed, in order to avoid confusion (except when this is what got decrypted). SEE ALSO
reformime(1)[1]. AUTHOR
Sam Varshavchik Author NOTES
1. reformime(1) [set $man.base.url.for.relative.links]/reformime.html Courier Mail Server 04/04/2011 MIMEGPG(1)
All times are GMT -4. The time now is 03:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy