Sponsored Content
Top Forums Shell Programming and Scripting How I can capture the last file in a directory in windows Post 302410772 by jim mcnamara on Tuesday 6th of April 2010 09:21:39 PM
Old 04-06-2010
Do you mean the file with the latest filetime (most recent file)?
Try one of these:
Code:
lastfile=$(ls -rt | tail -1)
# or
lastfile=$(ls -t | head -1)

Assuming I got what you wanted...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

moving files from a unix directory to a windows directory

Any body any ideas i'm failry new to this so any help would be appreciated. Cheers Steve (2 Replies)
Discussion started by: gleads
2 Replies

2. UNIX for Advanced & Expert Users

Capture Value from file

I have a file in the following Format Fundid: 100-BankA AccountNumber Balance 1 200 2 300 3 400 FundId:123321-BankB AccountNumber Balance 1 200 3 100 ........... I can have N number of funds. (1 Reply)
Discussion started by: kris01752
1 Replies

3. Shell Programming and Scripting

capture the file name

I am trying to capture the file name(which is not of fixed length) and put it in a variable. It is working in unix whereas when I am running the same script in Informatica it is not giving me the desired output. But when I comment the option(find the file name) then it is working fine. It can... (4 Replies)
Discussion started by: Mandab
4 Replies

4. Shell Programming and Scripting

Script to capture new lines in a file and copy it to new file

Hi All, I have a file that gives me new line/output every 5 minutes. I need to create a script that capture new line/output besides "IN CRON_STATUS", in this case the new output is "begin ------ cron_status.sh - -----------". I want this script to capture the line starting from "begin ------... (0 Replies)
Discussion started by: fara_aris
0 Replies

5. Shell Programming and Scripting

capture output of file and send last string thereof to new file

Hello, If I run a program from within shell, the output is displayed in the command line terminal. Is there a way I can capture that output and choose only the very last string in it to send it to a new file? Thank you (6 Replies)
Discussion started by: Lorna
6 Replies

6. Shell Programming and Scripting

Move a file from windows directory to unix directory

Move a file from windows directory to unix directory, is this possible? if it is, can someone help me on this? Thanks! God bless! (1 Reply)
Discussion started by: kingpeejay
1 Replies

7. UNIX for Dummies Questions & Answers

Copy directory from Linux to Windows

Hola a todos, soy realmente nuevo programando en bash, y aśn estoy encontrando bastantes baches :o, mi pregunta es simple, supongo, alguien podria decirme si existe una manera facil de copiar un directorio de un server a otro?, sucede que en un server(server1) tengo los backup de las bases de... (7 Replies)
Discussion started by: yeestrada
7 Replies

8. Programming

Copy directory from solaris to windows.

Hi All I am new to Unix/sloaris. I want to copy a directory (which conatins further sub directories and files)from sloaris to my windows.I am using PuTTy for it. please any one guide me how to do this or share with me some piece of script. It will be very regarded Best Wishes MIS. (1 Reply)
Discussion started by: MIS
1 Replies

9. Solaris

Copy directory from solaris to windows.

Hi All I am new to Unix/sloaris. I want to copy a directory (which conatins further sub directories and files)from sloaris to my windows.I am using PuTTy for it. please any one guide me how to do this or share with me some piece of script. It will be very regarded Best Wishes MIS. (3 Replies)
Discussion started by: MIS
3 Replies

10. AIX

Samba 3.6 on AIX 7.1 - Windows 10 Access to AIX file shares using Active Directory authentication

I am running AIX 7.1 and currently we have samba 3.6.25 installed on the server. As it stands some AIX folders are shared that can be accessed by certain Windows users. The problem is that since Windows 10 the guest feature no longer works so users have to manually type in their Windows login/pwd... (14 Replies)
Discussion started by: linuxsnake
14 Replies
X-TILE(1)						      General Commands Manual							 X-TILE(1)

NAME
x-tile - select windows and adjust their tiling SYNOPSIS
x-tile [option][rows][columns] DESCRIPTION
This manual page documents briefly the x-tile command. x-tile is a program that allows tiling selected windows as desired. In addition of the predefined tilings, it allows user to create up to two user defined tilings to be applied later. It also provides a system tray icon for faster access to tiling menu. OPTIONS
This program doesn't follow the usual GNU command line syntax, with long options starting with two dashes (`-'). Instead, it uses case sen- sitive single letter options, followed by arguments when required. A summary of options is included below. w Open the x-tile main window without using the panel. z Undo the latest tiling operation. v Tile all opened windows vertically. h Tile all opened windows horizontally. u Tile all opened windows triangularly, top up. d Tile all opened windows triangularly, top down. l Tile all opened windows triangularly, top left. r Tile all opened windows triangularly, top right. q Tile all opened windows in a four square grid. g Tile all opened windows in a grid with the given rows and columns. 1 Apply user defined tiling #1 to all opened windows. 2 Apply user defined tiling #2 to all opened windows. i Invert the order of the latest tiling operation. m Maximize all opened windows. M Unmaximize all opened windows. c Close all opened windows. Any other Show a brief summary of options. AUTHORS
x-tile was written by Giuseppe Penone <giuspen@gmail.com> and Chris Camacho <chris_camacho@yahoo.com>. This manual page was written by Ricardo Mones <mones@debian.org>, for the Debian project (and may be used by others). May 7, 2012 X-TILE(1)
All times are GMT -4. The time now is 04:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy