Your directions a not entirely clear, but I believe the following performs the actions you requested and verifies that each action was performed successfully.
Although this script uses ksh, it should also work with at least sh and bash.
Last edited by Don Cragun; 08-29-2012 at 02:14 AM..
This User Gave Thanks to Don Cragun For This Post:
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)
Hi,
I have the following subfolder with files:
/data/a/1/xxx.txt
/data/b/2/yyy.txt
/data/c/3/zzz.txt
And i have a set of new folders which have exactly the same structure as above but different disk without the files:
/data_02/a/1/
/data_02/b/2/
/data_02/c/3/
Now i would like to... (6 Replies)
suppose if i am checking folder g as shown below path
a/b/c/d/e/f/g ,and some directory c,d,e,f,g not present then is there anyway to create directory in one command
or i need to use mkdir for everyfolder (3 Replies)
Hi,
I have a filelist named filestomove.txt.
It can contain any number of files that need to be moved to a subdirectory.
All the files from filelist are in the same directory as the filelist, let say it's called Folder1.
All the files need to be moved to subfolder Folder1/Subfolder1.
... (1 Reply)
Hi Folks,
As part of my application I need to find out what the latest directory based
on the name of that directory (not it's file system timestamp).
Example: I have a directory which contains below directories (each of while contains files etc)
20120000/
20120000/
latest (symbolic link to... (5 Replies)
Hi,
Anybody help me to write a Shell Script
Get the latest file from the file list based on created and then move to the target directory.
Tried with the following script: got error.
A=$(ls -1dt $(find "cveit/local_ftp/reflash-parts" -type f -daystart -mtime -$dateoffset) | head... (2 Replies)
Hi folks,
In my application there is a job running which create a .dat file along with it zip file also at unix box location /opt/app/cvf/temp1
so in temp1 directory I have one .dat file and its zip file also.
Now since this job runs every day so if a job runs today there will be two files... (5 Replies)
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
Hello,
On Solaris 10, here are entries for logs in httpd.conf
ErrorLog "|/export/apache/apache-2.2.17/bin/rotatelogs -l -f /var/log/apache/error_log.%Y%m%d 86400"
It keeps creating daily logs with below names -
-rw-r--r-- 1 root root 1016747232 Apr 5 23:59... (16 Replies)
Discussion started by: solaris_1977
16 Replies
LEARN ABOUT DEBIAN
avinfo
AVINFO(1) User Commands AVINFO(1)NAME
AVInfo - Audio/Video file information automatic extractor
SYNOPSIS
avinfo [FILENAME] [OPTIONS] [TEMPLATE] [OUTPUT]
avinfo [-l=FILELIST] [OPTIONS] [TEMPLATE] [OUTPUT]
avinfo -l- [OPTIONS] [TEMPLATE] [OUTPUT]
avinfo [--help | --version]
DESCRIPTION
Extracts information from FILENAME or files in FILELIST and generates a report.
OPTIONS:
-f=extension
forces the use of module associated with extension
-l=list
use filelist (use -l- for stdin)
-i=ms delay between files in filelist (in ms) (/*TODO*/)
-e=ext exclude an extension (do not apply associated module)
-m=number
max line length (0 - no restriction)
-s=value
for advanced tuning of modules (/*TODO*/)
-v=name=value
set int. variable 'name' to 'value' (text or number)
External TEMPLATEs:
-th=template
header template (string, use without value to disable)
-thf=filename
get header template from a file
-tb=template
body template (string, use without value to disable)
-tbf=filename
get body template from a file
-tf=template
footer template (string, use without value to disable)
-tff=filename
get footer template from a file
Built-in TEMPLATEs:
--default
used by default
--description
for creating (updating) descrpipt.ion files
--list for filelist (plain text) generation
--html-list
for filelist (html) generation
--csv-list
for filelist (CSV, e.g. for Excel)
--short
alt. version of --default template
--far "nice" formated report (for FAR Manager) (contains MS-DOS pseudographic characters)
OUTPUT:
-o=file
file to write the report to (default is stdout)
Other OPTIONS:
--help prints this help page
--version
prints avinfo version and copyright
You can use ':' instead of '=' in all OPTIONS or just omit it.
TEMPLATEs use AVInfo Simple Script (A.S.S.) syntax.
Examples of commands:
avinfo file.ogm --raw
find . -name '*.avi' -print | avinfo -l- --html-list -o=avilist.html
avinfo -l:list -thf:header -tbf=body -tff=footer >report
SEE ALSO
Additional documentation for AVInfo can be found in the package documentation directory.
(c) George Shuklin, 2001-2004, http://shounen.ru/soft/avinfo/
This is free software. You are welcome to redistribute it under the terms and conditions of GNU General Public License.
AVInfo 1.0 alpha 15 [Balalaika] April 2005 AVINFO(1)