08-15-2006
Not a homwork
Hi Tayyab,
This is not a home work question. I started working in Unix just 6 months back. We have a daily synchronization of information with-in the internal systems of our company. like we recieve files like hotel_rates.ZZZ and once we post this data to database the file is stored in archive folder as (with a random 3 digit extention) hotel_rates.ZZZ.123 and once this file is pushed to archive folder there is no chance of modification. some times we might need to look up some information in these files which we posted, so This coding is a part of that.
We would need to retrieve the file with mtime.
so according to your notes, If we take the input as Aug 02 2006 would be better rather than 080206 right ?
let me know how to track the file and open it in readonly mode for recursive search (can we use 'less' in the shell script?)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a text file, foo.txt, it looks something like below. In the file there is a line that gives the date in the form of: Mon Jun 15 11:09:31 2008. I need to find which date is the newest and then store certain details of that list data to another file. So, in this sample text file, I... (6 Replies)
Discussion started by: boolean2222
6 Replies
2. Shell Programming and Scripting
Hi all,
I need to get the latest file. I have found this command "ls -lrt" that is great but not recursive.
Can anyone help?
Thanx by advance. (7 Replies)
Discussion started by: 1or2is3
7 Replies
3. UNIX for Advanced & Expert Users
I was working on a shell script and found that the find command took too long, especially when I had to execute it multiple times. After some thought and research I came up with two functions.
fileScan()
filescan will cd into a directory and perform any operations you would like from within... (8 Replies)
Discussion started by: newreverie
8 Replies
4. Shell Programming and Scripting
Hi All,
I am very new to UNIX and I have tried this for a longtime now and unable to crack it....
There is a file that is continuously updating. I need to search for the string and find the date @ which it updated every day.....
eg:
String is "work started"
The log entry is as below:
... (1 Reply)
Discussion started by: Nithz
1 Replies
5. Shell Programming and Scripting
Hi All,
This is the first time I have posted to this forum so please bear with me. Thanks also advance for any help or guidance.
For a project I need to do the following.
1. There are multiple files in multiple locations so I need to find them and the location. So I had planned to use... (9 Replies)
Discussion started by: Charlie6742
9 Replies
6. UNIX for Dummies Questions & Answers
Is there a way to use the find command to recursively scan directories for files greater than 1Gb in size and print out the directory path and file name only?
Thanks in advance. (6 Replies)
Discussion started by: jimbojames
6 Replies
7. Shell Programming and Scripting
Hi,
Need some help...
I want to execute sequence commands, like below
test1.sh
test2.sh
...etc
test1.sh file will generate log file, we need to search for 'complete' string on test1.sh file, once that condition success and then it should go to test2.sh file, each .sh scripts will take... (5 Replies)
Discussion started by: rkrish123
5 Replies
8. UNIX for Dummies Questions & Answers
Hi All
I have a requirement to find the file that are most latest to be modified in each directory. Can somebody help with the command please?
E.g of the problem.
The directory A is having sub directory which are having subdirectory an so on.
I need a command which will find the... (2 Replies)
Discussion started by: sudeep.id
2 Replies
9. Shell Programming and Scripting
I'm trying to find folders created by a propritary data aquisition software with the .aps ending--yes, I have never encountered folder with a suffix before (some files also end in .aps) and sort them by date. I need the whole path
ls -dt "$dataDir"*".aps"does exactly what I want except for the... (2 Replies)
Discussion started by: Michael Stora
2 Replies
10. Shell Programming and Scripting
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
LEARN ABOUT POSIX
macunpack
MACUNPACK(1) General Commands Manual MACUNPACK(1)
NAME
macunpack - Macintosh file de-archiver
SYNOPSIS
macunpack [ - options ] [ file ]
DESCRIPTION
macunpack takes the Macintosh MacBinary archive specified in file (or standard input if none is specified) and extracts the files it con-
tains subject to the options specified. The program will also accept the data fork of the archive for some kinds of archive as standard
input.
OPTIONS
In the absence of any options, macunpack takes the specified archive and silently extracts the file(s) it contains into MacBinary format,
giving the output files ".bin" extensions and placing them in the current working directory. Subdirectories are created for embedded fold-
ers.
-3 Write files in fork format (.info, .data and .rsrc files.)
-f As -3, but empty data and rsrc files are not created.
-r Write resource forks only (.rsrc files.)
-d Write data forks only (.data files.)
-u As -d, but the codes for CR and LF are interchanged, the filename extension is .text.
-U As -u, but there is no filename extension.
-a Write files in AppleShare format. This option is only valid if the program is compiled with support for some form of AppleShare.
The current directory must be a valid AppleShare folder.
-s Write extracted files to standard output in MacBinary format.
-l List every file extracted (and every directory/folder created etc.)
-v Like -l, but more verbose (implies -l.)
-i Do not extract, give information only (implies -l.)
-q Ask the user for every file/folder whether it should be extracted (implies -l.)
-V Gives the patchlevel of the program, and other information. Other options are ignored and the program quits immediately.
-H Give short information about the options. Other options are ignored and the program quits immediately.
BUGS
As this is a beta release, there may still be some problems. Archives that are password protected and multi-file archives are not dealt
with.
SEE ALSO
macutil(1)
AUTHOR
Dik T. Winter, CWI, Amsterdam, The Netherlands (dik@cwi.nl)
Parts of the code are based on codes from: Steve Davies, Rahul Dhesi, Casper H.S. Dik, Jim McKie, Mark G. Mendel, Haruhiko Okumura, Joe
Orost, Samuel H. Smith, Yooichi Tagawa, Spencer W. Thomas, Ken Turkowski, Allan G. Weber, James A. Woods and Haruyasu Yoshizaki.
3rd Berkeley Distribution October 22, 1992 MACUNPACK(1)