Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Finding the modified timestamp of files from the piped output of du command Post 302821343 by kraljic on Friday 14th of June 2013 11:53:08 AM
Old 06-14-2013
Sorry to bring this thread back again for this trivial thing.
I was testing the awk command you mentioned to pipe the second column of the du output to ls command.

awk command returned the correct dumpfiles (second column) as shown above.
Code:
$ du -sh *.dmp | awk '{ print $2 }'
expdp_src_message_01.dmp
expdp_src_message_02.dmp
expdp_src_message_03.dmp
exp_metadata_2013_05_10.dmp
exp_OAT_270513_01.dmp
exp_OAT_270513_02.dmp
exp_OAT_270513_03.dmp
exp_OAT_2705131_01.dmp
exp_OAT_2705131_02.dmp
exp_OAT_2705131_03.dmp
RFDNS_BRNT_HK_OAT_01-codes.dmp
RFDNS_BRNT_HK_OAT_01-TABLES-CodeSJune7.dmp
RFDNS_BRNT_HK_OAT_01-TABLES.dmp
RFDNS_BRNT_HK_OAT_01-TABLESNV.dmp
TABLES-CodeSJune7.dmp

But when I piped it to ls command , it was returning lots of files which weren't expected like .log files, .dmp.gz file,..etc
Code:
du -sh *.dmp | awk '{ print $2 }' | ls -alrt

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Finding modified files

Last week I was using the command: ' find /directory -mtime -2 -print' and it showed all the files modified within that period. However, now it only displays the directories and not the files modified. The only thing that changed is that I was granted access to some files. Thanks (2 Replies)
Discussion started by: rhayabusa
2 Replies

2. Shell Programming and Scripting

Finding out the last modified time for files

I need to find out the last modified time for the files which are older than 6 months. If I use ls -l, the files which are older than 6 months, I am just getting the day, month and year instead of exact time. I am using Korn shell, and SUN OS. Thanks in Advance, Kiran (3 Replies)
Discussion started by: kumariak
3 Replies

3. Solaris

Finding list of modified files for a particular time duration

Hi , I am trying to find out the List of files modified or added aftter installation of any component on SUN solaris box . But i am not able to do it using ls or find command . Can somebody help me out ? Thanks Sanjay Gupta (2 Replies)
Discussion started by: sanajyg_mnit
2 Replies

4. Shell Programming and Scripting

Finding files which are modified few mins ago

Hi All, I have a requirement to find out the files which are modified in the last 10 minutes. I tried the find command with -amin and -mmin options, but its not working on my AIX server. Can anyone of you could help me. Thanks in advance for your help. Raju (3 Replies)
Discussion started by: rajus19
3 Replies

5. Shell Programming and Scripting

How to get a filename modified by attaching modified timestamp

Hi, I want to modify a filename in AIX by attaching the last modified timestamp. I want the timestamp completely in numerical format (eg:200905081210. yr-2009, mnth - 05, date -08, hr - 12, mins - 10). For example if the filename is a.log and it was modified on April 6th 2008 at 21.00. I... (16 Replies)
Discussion started by: Ruks
16 Replies

6. Shell Programming and Scripting

Can't Output Piped Perl In-line command to a File

Hello, I'm pretty stumped, and I don't know why I am not able to redirect the output to the 'graphme' file with the command below in Fedora 18. tcpdump -l -n -t "tcp == 18" | perl -ane '($s,$j)=split(/,/,$F,2); print "$s\n";' > graphme In case you're wondering, I was following the example... (2 Replies)
Discussion started by: ConcealedKnight
2 Replies

7. Shell Programming and Scripting

How to read and write last modified timestamp to files?

Need help reading file last modified date in format: Filename (relative path);YYYYMMDDHHMMSS And then write it back. My idea is to backup it to a text file to restore later. Checked this command but does not work: Getting the Last Modification Timestamp of a File with Stat $ stat -f... (5 Replies)
Discussion started by: Tribe
5 Replies

8. UNIX for Dummies Questions & Answers

Find all files containing string not following symlinks CAT (modified) output content to /filename

This should recursively walk through all dirictories and search for a specified string in all present files, if found output manicured content (eg some regex) with CAT into a specified directory (eg /tmp/) one by one, keeping the original names This is what I have so far, which seems to... (1 Reply)
Discussion started by: lowmaster
1 Replies

9. Shell Programming and Scripting

Use cut output as variable piped awk command

Hi, I would like use the output of my cut command as a variable in my following awk command. Here's what I've written. cut -f1 info.txt | awk -v i=xargs -F'' '{if($6 == $i) print $20}' summary.txt Where obviously the 'xargs' doesn't do what I want. How can I pass my cut result to my awk... (3 Replies)
Discussion started by: heyooo
3 Replies
LIBMP(3)						   BSD Library Functions Manual 						  LIBMP(3)

NAME
libmp -- traditional BSD multiple precision integer arithmetic library SYNOPSIS
#include <mp.h> Function prototypes are given in the main body of the text. Applications using this interface must be linked with -lmp (this library) and -lcrypto (crypto(3)). DESCRIPTION
This interface is obsolete in favor of the crypto(3) BIGNUM library. libmp is the traditional BSD multiple precision integer arithmetic library. It has a number of problems, and is unsuitable for use in any programs where reliability is a concern. It is provided here for compatibility only. These routines perform arithmetic on integers of arbitrary precision stored using the defined type MINT. Pointers to MINT are initialized using mp_itom() or mp_xtom(), and must be recycled with mp_mfree() when they are no longer needed. Routines which store a result in one of their arguments expect that the latter has also been initialized prior to being passed to it. The following routines are defined and imple- mented: MINT *mp_itom(short n); MINT *mp_xtom(const char *s); char *mp_mtox(const MINT *mp); void mp_mfree(MINT *mp); mp_itom() returns an MINT with the value of n. mp_xtom() returns an MINT with the value of s, which is treated to be in hexadecimal. The return values from mp_itom() and mp_xtom() must be released with mp_mfree() when they are no longer needed. mp_mtox() returns a null-terminated hexadecimal string having the value of mp; its return value must be released with free() (free(3)) when it is no longer needed. void mp_madd(const MINT *mp1, const MINT *mp2, MINT *rmp); void mp_msub(const MINT *mp1, const MINT *mp2, MINT *rmp); void mp_mult(const MINT *mp1, const MINT *mp2, MINT *rmp); mp_madd(), mp_msub(), and mp_mult() store the sum, difference, or product, respectively, of mp1 and mp2 in rmp. void mp_mdiv(const MINT *nmp, const MINT *dmp, MINT *qmp, MINT *rmp); void mp_sdiv(const MINT *nmp, short d, MINT *qmp, short *ro); mp_mdiv() computes the quotient and remainder of nmp and dmp and stores the result in qmp and rmp, respectively. mp_sdiv() is similar to mp_mdiv() except the divisor (dmp or d) and remainder (rmp or ro) are ordinary integers. void mp_pow(const MINT *bmp, const MINT *emp, const MINT *mmp, MINT *rmp); void mp_rpow(const MINT *bmp, short e, MINT *rmp); mp_rpow() computes the result of bmp raised to the empth power and reduced modulo mmp; the result is stored in rmp. mp_pow() computes the result of bmp raised to the eth power and stores the result in rmp. void mp_min(MINT *mp); void mp_mout(const MINT *mp); mp_min() reads a line from standard input, tries to interpret it as a decimal number, and if successful, stores the result in mp. mp_mout() prints the value, in decimal, of mp to standard output (without a trailing newline). void mp_gcd(const MINT *mp1, const MINT *mp2, MINT *rmp); mp_gcd() computes the greatest common divisor of mp1 and mp2 and stores the result in rmp. int mp_mcmp(const MINT *mp1, const MINT *mp2); mcmp compares the values of mp1 and mp2 and returns 0 if the two values are equal, a value greater than 0 if mp1 is greater than mp2, and a value less than 0 if mp2 is greater than mp1. void mp_move(const MINT *smp, MINT *tmp); mp_move() copies the value of smp to tmp (both values must be initialized). void mp_msqrt(const MINT *nmp, MINT *xmp, MINT *rmp); mp_msqrt() computes the square root and remainder of nmp and stores them in xmp and rmp, respectively. IMPLEMENTATION NOTES
This version of libmp is implemented in terms of the crypto(3) BIGNUM library. DIAGNOSTICS
Running out of memory or illegal operations result in error messages on standard error and a call to abort(3). SEE ALSO
abort(3), bn(3), crypto(3), free(3), malloc(3), math(3) HISTORY
A libmp library appeared in 4.3BSD. FreeBSD 2.2 shipped with a libmp implemented in terms of libgmp. This implementation appeared in FreeBSD 5.0. BUGS
Errors are reported via output to standard error and abnormal program termination instead of via return values. The application cannot con- trol this behavior. It is not clear whether the string returned by mp_mtox() may be written to by the caller. This implementation allows it, but others may not. Ideally, mp_mtox() would take a pointer to a buffer to fill in. It is not clear whether using the same variable as both source and destination in a single invocation is permitted. Some of the calls in this implementation allow this, while others do not. BSD
September 7, 1989 BSD
All times are GMT -4. The time now is 12:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy