Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Finding the lowest sequenced file in a directory? Post 302203138 by stky13 on Friday 6th of June 2008 02:58:32 PM
Old 06-06-2008
Finding the lowest sequenced file in a directory?

Hello,

I have three files in a directory:


1_700_123456.lst
1_701_123456.lst
1_702_123456.lst





I am trying to use a command via ksh that will list the file that has the lowest number in the second node and put that to a file.

In the example above, it would put 1_700_123456.lst in a file.



Any ideas on how to do this easily?



Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

finding file in a directory

hi can i know how to locate a file in a directory by using the "find" command? i want to know the exact path the files reside in in the result. thanks :confused: (4 Replies)
Discussion started by: legato
4 Replies

2. Programming

Finding largest file in current directory?

I was hoping to get some assistance with this C program I am working on. The goal is to find the largest file in the current directory and then display this filename along with the filesize. What I have so far will display all the files in the current directory. But, how do I deal with "grabbing"... (1 Reply)
Discussion started by: AusTex
1 Replies

3. Shell Programming and Scripting

Finding the oldest file in a particular directory

Hi all, I am a newbie to scripting and I need your help regarding finding the oldest file in a particular directory. My intention is to remove that oldest file. Are there any options available with the "find" command to do this.. Thanks in advance for your help Pavan (4 Replies)
Discussion started by: pavan_movva
4 Replies

4. Shell Programming and Scripting

Korn Shell - Finding lowest number of a file.

I'm writing a KSH script that will get a file on the command line (such as input.txt), and in this file there is on number per line. The program needs to take the file, read each and determine the lowest number in the file. I currently have a while loop setup that will correctly out put every... (8 Replies)
Discussion started by: denyal
8 Replies

5. UNIX and Linux Applications

Finding the oldest file in a directory without ls

I am trying to determine the oldest and most recent files in a huge directory. I am using an ls -tr statement outside my find statement. The directory is too big and I am getting an "arg list too long" error. Is there something I can put in my find statement that doesn't create a list to... (2 Replies)
Discussion started by: hiyofjord
2 Replies

6. UNIX for Dummies Questions & Answers

Finding file in a directory structure + move

Hi All, im a new guy if it comes to Unix. I am trying to auto categorize Nzbget downloads the most basic way. I already manage to find files within the directory i'm at and move them with if check to a certain dir. Unfortunately this command is restricted to the directory i'm at and does not... (2 Replies)
Discussion started by: RoxXxoR
2 Replies

7. Shell Programming and Scripting

finding lowest numbers

i want to basically get the lowest numbers from a list ... for example my input file is .... 1 2 3 6 7 8 9 10 11 13 Now i want to create a script or a one liner which i can use like this ... for example ..../getlowest 3 --> this gives me the next 3 lowest numbers which... (6 Replies)
Discussion started by: greycells
6 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Finding the latest file in a directory

Hi All, I am using the below command to find the latest file in a dir: ls -tr $v_sftphomedir/$v_sourcefile |tail -1 or ls -t1 $v_sftphomedir/$v_sourcefile |head -1 and the outpur returned is below: /home/cobr_sftp/var/controllingload/Backup/Dbrwds_Div_1796050246.txt I need only the... (5 Replies)
Discussion started by: abhi_123
5 Replies

9. UNIX for Dummies Questions & Answers

Finding new file, but excluding directory..

hi, I need to find files that have been created less than 3 days ago. However, I need to only search specific directories. I've searched about the net and found some useful commands such as : find . -type d -name 'dir_to_exclude' -prune -o -print -mtime -3 however I cannot get it... (2 Replies)
Discussion started by: horhif
2 Replies

10. Shell Programming and Scripting

Finding the file name in a directory with a pattern

I need to find the latest file -filename_YYYYMMDD in the directory DIR. the below is not working as the position is shifting each time because of the spaces between(occuring mostly at file size field as it differs every time.) please suggest if there is other way. report =‘ls -ltr... (2 Replies)
Discussion started by: archana25
2 Replies
tcpvmexportd(1) 					      General Commands Manual						   tcpvmexportd(1)

NAME
tcpvmexportd - transcode PVM3 export interface SYNOPSIS
tcpvmexportd -s|-m [ options ] COPYRIGHT
tcpvmexportd is Copyright (C) by Malanchini Marzio DESCRIPTION
tcpvmexportd This is the frontend for all the activity of export_pvm module: the program is spawned on all cluster hosts and wait to do the encode work. OPTIONS
-s Start tcpvmexportd in slave mode (internal use of export_pvm) [default]. Sub Options for slave mode -j Start merger process [off]. -L Create only the merge list [off]. -c name Name of slave function req in slave mode [none]. -x parameters Multiplex parameters [none]. -1 param First parameter to pass to the slave function [null]. -2 param Second parameter to pass to the slave function [null]. -3 param Third parameter to pass to the slave function [null]. -t type Elab video or audio frame (video|audio|system|multisystem) [video]. -f name Out file name [/tmp/my_file_name] -p number Multipass (0,1,2,3) [0]. -M Enable internal multipass [off]. -m Start tcpvmexportd in master mode [off]. Sub Options for master mode -j Start the batch merge mode [off]. -C Check the config or merge file [off]. -f name Input file name [/tmp/my_file_name] -h Print help. -v Print the version. EXAMPLES
Command: tcpvmexportd -m -j -f mylistfile.lst Run tcpvmexportd in batch merge mode. tcpvmexportd -m -C -f mylistfile.lst Check the config or the merge file. AUTHORS
tcpvmexportd was written by Marzio Malanchini <marzio_malanchini@vodafone.it> SEE ALSO
transcode(1) tcpvmexportd(1) 8th August 2003 tcpvmexportd(1)
All times are GMT -4. The time now is 06:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy