11-15-2012
What OS are you using since your output is not what I would expect?
IMHO using ls without -l should not give the absolute path...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
i want to search a file in the dir , if file exists for todays date print the message that file found or if file does not exist for todays date/ if file not found i want to display message saying that file not found. How to do this.
Thx for your help. (2 Replies)
Discussion started by: nick12
2 Replies
2. Shell Programming and Scripting
Hi guys,
I have a directory in UNIX having files with the below format, i need to pickup the latest file having recent timestamp embedded on it, then need to rename it to a standard file name.
Below is the file format:
filename_yyyymmdd.csv, i need to pick the latest and move it with the... (1 Reply)
Discussion started by: kaushik25
1 Replies
3. Shell Programming and Scripting
Hi All,
I am in the directory a/b/processed
the files in this directories are
-rw-r--r-- 1 owb users 330 Aug 8 chandantest.txt_08082008
-rw-r--r-- 1 owb users 220 Aug 7 chandantest.txt_07082008
-rw-r--r-- 1 owb users 330 Aug 6... (3 Replies)
Discussion started by: chandancsc
3 Replies
4. Shell Programming and Scripting
Hi Team,
I wish to copy the latest file of pattern "MyFile*" to some other location.
I need to do all the operation in a single command separated by |.
ls -rt <MyFile*> | tail -1 | <copy command>.
How can I do?
Please help me.
Thanks,
Kanda (2 Replies)
Discussion started by: spkandy
2 Replies
5. UNIX for Dummies Questions & Answers
I only know how to list all sub-directories or files in specified directory. I don't know how to order them by modified date, furthermore, I don't know how to get the top one file in the sorted list. Wish you can do me a favor. Thanks in advance! (3 Replies)
Discussion started by: crest.boy
3 Replies
6. Shell Programming and Scripting
I Need help for one requirement,
I want to move the latest/Older file in the folder to another file. File have the datetimestamp in postfix.
Example:
Source Directory : \a
destination Directory : \a\b
File1 : xy_MMDDYYYYHHMM.txt (xy_032120101456.txt)
File2: xy_MMDDYYYYHHMM.txt... (1 Reply)
Discussion started by: pp_ayyanar
1 Replies
7. Shell Programming and Scripting
Hi Everyone,
I am writing a shell script and I am struck here:
I need to find the latest file in a directory depending upon the date.
For example:
The files in the directory are:
Filename_bo_20110619
Filename_bo_20110620
Filename_bo_20110621
Filename_bo_20110622
So here, I want... (2 Replies)
Discussion started by: filter
2 Replies
8. Shell Programming and Scripting
I wan to pick the latest modified file name and redirect it to a file ..
ls -tr | tail -1 >file
but this is printing file ins side the filename ,
can anyone help me out (5 Replies)
Discussion started by: vishwakar
5 Replies
9. Shell Programming and Scripting
I am trying to look into multiple directories and pluck out the latest version of a specific file, regardless of where it sits within the directory structure.
Ex:
The file is a .xls file and could have a depth within the directory of anywhere from 1-5
Working directory - Folder1... (6 Replies)
Discussion started by: co21ss
6 Replies
10. Shell Programming and Scripting
I believe there are couple of syntax issues in my script, couldn't find them :(
can someone help me with fixing it to make it work.
cd /abcde/
#get the latest filename excluding subdirs
filename=`ls -ltr | grep ^- | tail -1 | awk '{print $8}'`
#get system date and file timestamp and... (3 Replies)
Discussion started by: simpltyansh
3 Replies
LEARN ABOUT DEBIAN
cfetooldump
CFETOOLDUMP(8) User Contributed Perl Documentation CFETOOLDUMP(8)
NAME
cfetooldump - dump the contents of a database in XML format
SYNOPSIS
cfetool dump name [--path|-p directory name] [--file|-f filename] [--daily|-d] [--weekly|-w] [--yearly|-y] [--verbose|-v] [--help|-h]
DESCRIPTION
Prints the contents of the specified database in XML format, with comments for human readability. This format can be read by cfetool
import.
The -d, -w, and -y options specify which databases to include in the dump, and may be combined. If they are all omitted, the default is to
only dump the weekly database.
OPTIONS
--path|-p directory name
Names the directory in which the database specified by name can be found.
--file|-f filename
Names a file to print the XML to. If this option is omitted, the XML will be printed to the standard output stream.
--daily|-d
Include the daily pattern database in the dump.
--weekly|-w
Include the weekly pattern database in the dump.
--yearly|-y
Include the yearly pattern database in the dump.
--verbose|-v
Print details of the command's execution to the standard output stream. When using this argument, it is recommended that you also pro-
vide the -f argument, to avoid sharing the standard output stream.
--help|-h
Print a short help message and then exit.
EXAMPLE
% cfetool dump temperature --path /my/path -f temperature.xml
Prints the following to the file temperature.xml:
<!-- cfetool Database Dump -->
<dump>
<name> temperature </name>
<age> 1 </age> <!-- steps (0.001 weeks) -->
<step> 10 </step> <!-- minutes -->
<!-- consecutive updates -->
<iterations> 1 </iterations>
<!-- last update at Tue Aug 31 10:32:05 2004 -->
<timestamp> 1093973525 </timestamp>
<!-- current weighted average -->
<expect> 7.105000 </expect>
<!-- current variance -->
<var> 38.280217 </var>
<!-- data entries -->
<entry> <timekey> Tue:Hr10:Min30_40 </timekey>
<expect> 10.150000 </expect>
<var> 13.245750 </var>
</entry>
</dump>
AUTHORS
The code and documentation were contributed by Stanford Linear Accelerator Center, a department of Stanford University. This documentation
was written by
Elizabeth Cassell <e_a_c@mailsnare.net> and
Alf Wachsmann <alfw@slac.stanford.edu>
COPYRIGHT AND DISCLAIMER
Copyright 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
Elizabeth Cassell <e_a_c@mailsnare.net>
All rights reserved.
perl v5.8.4 2004-09-21 CFETOOLDUMP(8)