Sponsored Content
Top Forums Shell Programming and Scripting Needed shell script to get the latest file based on date Post 302769322 by hemanthsaikumar on Tuesday 12th of February 2013 01:53:25 AM
Old 02-12-2013
actually i got a change in my requirement can u solve the above problem..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script to ftp latest file

Hello All, Hope u r doing fine. I'm writing a shell script to ftp the latest file having pericular convention as 'ULTI_15072007043205.txt' on daily basis. Now the date & timing of the file geleration isnt constant, so the file name daily varies as per the date & timing of generation. Can anyone... (7 Replies)
Discussion started by: im_new
7 Replies

2. Shell Programming and Scripting

shell script to selectively tar directory based on date

hye everybody :) , i'm new to the scripting world.. hope you guys can help me out with this one.. i'm trying to identify any directory under /tmp/saya that is created more than one day from the current date.. e.g, today is March 14, so any directory that has time stamp March 13 backwards, i... (2 Replies)
Discussion started by: fara_aris
2 Replies

3. Shell Programming and Scripting

shell script to find latest date and time of the files

Hi everyone, Please help:) I have a list of 1000 different files which comes daily to the directory.Some of the files are not coming to the directory now. I need to write a shell script to find the latest date and time of the files they came to the directory. The files should be unique.... (1 Reply)
Discussion started by: karthicss
1 Replies

4. Shell Programming and Scripting

grep latest file based on date.

hi all, not sure if this has been posted b4 but i try to search but not valid. this is my question: when i do a ls -ltr there will be a list generated as follows: -rw-r--r-- 1 root sys 923260 Jan 10 04:38 FilePolling.41025.083TL021.xml -rw-r--r-- 1 root sys 1761337 Jan 10 04:40... (12 Replies)
Discussion started by: lweegp
12 Replies

5. Shell Programming and Scripting

How to FTP the latest file, based on date, from a remote server through a shell script?

How to FTP the latest file, based on date, from a remote server through a shell script? I have four files to be FTP'ed from remote server. They are of the following format. build1_runtime_mmddyyyy.txt build2_runtime_mmddyyyy.txt build3_runtime_mmddyyyy.txt buifile_count_mmddyyyy.txt ... (9 Replies)
Discussion started by: imran_affu
9 Replies

6. Shell Programming and Scripting

Shell script to get the latest file from the file list and move

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)
Discussion started by: saravan_an
2 Replies

7. Shell Programming and Scripting

Find the latest file based on the date in the filename

Hi, We've a list of files that gets created on a weekly basis and it has got a date and time embedded to it. Below are the examples. I want to find out how to get the latest files get the date and time stamp out of it. Files are PQR123.PLL.M989898.201308012254.gpg... (1 Reply)
Discussion started by: rudoraj
1 Replies

8. Shell Programming and Scripting

Help with korn shell script to get the latest file versions in a directory

I want to write a korn shell script to get the latest three versions for a file in the directory having lot of files with various versions (files with prefix as same but time stamp as suffix) and compress it and at the same time have to remove the remaining versions of the file (other than latest... (4 Replies)
Discussion started by: maheshbabu
4 Replies

9. Shell Programming and Scripting

Script to determine Date,TotalFile,total size of file based on date

I have file listed like below -rw-r--r--+ 1 test test 17M Nov 26 14:43 test1.gz -rw-r--r--+ 1 test test 0 Nov 26 14:44 test2.gz -rw-r--r--+ 1 test test 0 Nov 27 10:41 test3.gz -rw-r--r--+ 1 test test 244K Nov 27 10:41 test4.gz -rw-r--r--+ 1 test test 17M Nov 27 10:41 test5.gz I... (5 Replies)
Discussion started by: krish2014
5 Replies

10. UNIX for Beginners Questions & Answers

Run shell script based on date file

Hi Team, I have a to run a script based on a date present in a different file which updates everyday. Kindly help with the solution. My current execution : ksh scriptname.sh 10152019. But here i want to enter this date from a file which gets updated daily. My appraoch : date file location:... (3 Replies)
Discussion started by: midhun3108
3 Replies
GPHOTO2(1)																GPHOTO2(1)

NAME
gphoto2 - command-line gphoto2 client SYNOPSIS
gphoto2 [--debug] [-q | --quiet] [-v | --verbose] [-h | --help] [--list-cameras] [--usb-usermap-script NAME] [--print-usb-usermap] [--list-ports] [--stdout] [--stdout-size] [--auto-detect] [--port PATH] [--speed SPEED] [--camera MODEL] [--filename FILENAME] [--usbid USBID] [-a | --abilities] [--folder FOLDER] [[-R | --recurse] | --norecurse] [-l | --list-folders] [-L | --list-files] [-m NAME | --mkdir NAME] [-r NAME | --rmdir NAME] [-n | --num-files] [-p RANGE | --get-file RANGE] [-P | --get-all-files] [-t RANGE | --get-thumbnail RANGE] [-T | --get-all-thumbnails] [-r RANGE | --get-raw-data RANGE] [--get-all-raw-data] [--get-audio-data RANGE] [--get-all-audio-data] [-d RANGE | --delete-file RANGE] [-D | --delete-all-files] [-u FILENAME | --upload-file FILENAME] [--capture-preview] [--capture-image] [--capture-movie] [--capture-sound] [--capture-show-info RANGE] [--summary] [--manual] [--about] [--shell] DESCRIPTION
gphoto2(3) is a cross-platform digital camera library, and gphoto2(1) is a command-line client for it. Where an option takes a range of files, thumbnails, or other data, they are numbered beginning at 1. A range is a comma-separated list of numbers or spans (``first-last''). Ranges are XOR (exclusive or), so that ``1-5,3,7'' is equivalent to ``1,2,4,5,7''. --debug Turn on debugging. -q, --quiet Quiet output (default=verbose). -v, --version Display version and exit. -h, --help Display a short usage message. --list-cameras List supported camera models. --usb-usermap-script NAME Use NAME as the hotplug usb script used in the output of --print-usb-usermap. Default is "usbcam". --print-usb-usermap For every camera supported by your version of gphoto2, print the corresponding line for inclusion into the usb.usermap hotplug con- fig file. The script name used in these lines is specified with the --usb-usermap-script option. --list-ports List supported port devices. --stdout Send file to stdout. --stdout-size Print filesize before data. --auto-detect List auto-detected cameras. --port PATH Specify port device. --speed SPEED Specify serial transfer speed. --camera MODEL Specify camera model. Most model names contain spaces: remember to enclose the name in quotes so that the shell knows it is one parameter. For example: --camera "Kodak DC240". --filename FILENAME Specify a filename. --usbid USBID (Expert only) Override USB IDs. -a, --abilities Display camera abilities. -f, --folder FOLDER Specify camera folder (default="/"). -R, --recurse Recursion (default for download). --no-recurse No recursion (default for deletion). -l, --list-folders List folders in folder. -L, --list-files List files in folder. -m, --mkdir NAME Create a directory. -r, --rmdir NAME Remove a directory. -n, --num-files Display number of files. -p, --get-file RANGE Get files given in range. -P, --get-all-files Get all files from folder. -t, --get-thumbnail RANGE Get thumbnails given in range. -T, --get-all-thumbnails Get all thumbnails from folder. -r, --get-raw-data RANGE Get raw data given in range. --get-all-raw-data Get all raw data from folder. --get-audio-data RANGE Get audio data given in range. --get-all-audio-data Get all audio data from folder. --delete-files RANGE Delete files given in range. --delete-all-files Delete all files in folder. -u, --upload-file FILENAME Upload a file to camera. --capture-preview Capture a quick preview. --capture-image Capture an image. --capture-movie Capture a movie. --capture-sound Capture an audio clip. --show-info RANGE Show info. --summary Summary of camera status. --manual Camera driver manual. --about About the camera driver. --shell Start the gphoto2 shell, an interactive environment. See SHELL MODE for a detailed description. SHELL MODE
The following commands are available: cd Change to a directory on the camera. lcd Change to a directory on the local machine. exit, quit, q Exit the gphoto2 shell. get Download the file to the current directory. get-thumbnail Download the thumbnail to the current directory. get-raw Download raw data to the current directory. show-info Show information. delete Delete a file or directory. show-exif Show EXIF information (only if compiled with EXIF support). help, ? Displays command usage. ls List the contents of the current directory on the camera. SEE ALSO
gphoto2(3), gphoto2.txt, gphoto2-cli.txt, http://www.gphoto.org/ EXAMPLES
gphoto2 --list-files List files on camera. gphoto2 --get-file 7-13 Get files number 7 through 13 from the list output by gphoto2 --list-files. gphoto2 --usb-usermap-script gphoto2cam --print-usb-usermap >> /etc/hotplug/usb.usermap Append a line to the hotplug config file /etc/hotplug/usb.usermap for every supported camera, using /etc/hotplug/usb/gphoto2cam for setting up permissions correctly. AUTHOR
The gPhoto2 Team. Man page edited by Tim Waugh <twaugh@redhat.com>. February 2002 GPHOTO2(1)
All times are GMT -4. The time now is 09:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy