06-24-2003
See the man page for the ls command - note the -t and -r options.
-t Sorts by time stamp (latest first) instead of by name.
The default is the last modification time. (See -u and -c.)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
There are huge no of files in the directory. If i say ls -ltr it is taking too much time. i want to see only the files for Feb,2009. Please help.
Thanks (3 Replies)
Discussion started by: venkatesht
3 Replies
2. Shell Programming and Scripting
Hello
I have three directory structures for code releases.
Each directory structure looks like this:
bash-3.00$ ls -R | more
.:
Test_Release_1
Test_Release_2
Test_Release_3
./Test_Release_1/dbcode:
rp_online_import_srdp.pkb-1
srdp_ar_validation.pkb-1... (1 Reply)
Discussion started by: Glyn_Mo
1 Replies
3. 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
4. Shell Programming and Scripting
I want to get the latest files from multiple directories, d1, d2,d3 and d4 under the parent dierectoy d.
can anyone help out with this?
thx (3 Replies)
Discussion started by: shyork2001
3 Replies
5. Shell Programming and Scripting
I'd like to grep files for key words using korn shell, and compile the actual contents (not just file name) of those files that contain a combination of those grepped key words into one repository file for reference. However, I'm stuck at the combining part. Here's what I have thus far:
egrep... (5 Replies)
Discussion started by: drumminfool91
5 Replies
6. UNIX for Dummies Questions & Answers
Hello all!! I am new here and new in scripting!
I want to write a ksh script to select the most recent file from a dir and use it in a variable.
I have a directory with files named like: YYYMMDD
A basic idea of the script I want to write is
#!/usr/bin/ksh
latest= latest_dated_file at... (2 Replies)
Discussion started by: chris_euop
2 Replies
7. Shell Programming and Scripting
hi,
i have some file in a directory say
p1.txt.201305051200.lst
p1.txt.201305051300.lst
p1.txt.201306051200.lst
p1.txt.201306051300.lst
p2.txt.201306051200.lst
p2.txt.201306051300.lst
i am using p* pattern to retrieve these file
ls -1 p*
the files in red color are the latest... (7 Replies)
Discussion started by: Little
7 Replies
8. Shell Programming and Scripting
3679 Jul 21 23:59 belk_rpo_error_**po9324892**_07212014.log
0 Jul 22 23:59 belk_rpo_error_**po9324892**_07222014.log
3679 Jul 23 23:59 belk_rpo_error_**po9324892**_07232014.log
22 Jul 22 06:30 belk_rpo_error_**po9324267**_07012014.log
0 Jul 20 05:50... (5 Replies)
Discussion started by: LoneRanger
5 Replies
9. Shell Programming and Scripting
find /tmp/testlog/kSR*"_"2018* -type f -printf '%T@ %p\n' | sort -n | tail -3 | cut -f2- -d" "
/tmp/testlog/log/KSR04_2018-07-05.log
/tmp/testlog/log/KSR04_2018-07-06.log
/tmp/testlog/log/KSR01_2018-07-06.log
But, I would see the following output(latest files for each KSR tuype)
... (3 Replies)
Discussion started by: jhonnyrip
3 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I have list of files like below with name abcxyz.timestamp. I need a unix command to pick the latest file from the list of below files. Here in this case the lates file is abcxyz.20190304103200. I have used this unix command "ls abcxyz*|tail -1" but i heard that it is not the appropriate... (2 Replies)
Discussion started by: rakeshp
2 Replies
RAPID(6) Games RAPID(6)
NAME
rapid - content download tool for spring
SYNOPSIS
rapid [options] <action> [<argument>]
rapid-spring [options] <action> [<argument>]
DESCRIPTION
Rapid manages downloads of content for the spring RTS engine.
OPTIONS
action in the command line is one of:
upgrade: Install the latest package for all pinned tags.
clean-upgrade: Equivalent to 'upgrade' followed by 'uninstall-unpinned'.
pin: Pins a tag and installs the latest package for that tag.
unpin: Unpins a tag. Does not uninstall any packages.
install: Install a package. Does not pin any tags.
uninstall: Uninstall a package. Unpin its tag if any.
list-tags: List all tags that contain <argument>.
list-pinned-tags: Idem, but only pinned tags.
list-packages: List all packages whose name contains <argument>.
list-installed-packages: Idem, but only installed packages.
uninstall-unpinned: Keep only the pinned tags and all dependencies.
collect-pool: Remove pool files not needed by any installed package.
make-sdd: Extract pool files into a .sdd archive.
these are the possible options:
-h, --help show this help message and exit
--datadir=DATADIR Override the default data directory. (~/.spring on Linux or the one reported by unitsync on Windows)
--unitsync Use unitsync to locate the data directory Spring uses.
--no-unitsync Do not use unitsync.
EXAMPLES
rapid pin xta:latest # installs latest XTA
rapid pin s44:latest # installs latest Spring: 1944
rapid upgrade # upgrade all pinned tags
SEE ALSO
rapid-gui(6), spring(6)
AUTHOR
Tobi Vollebregt <tobivollebregt@gmail.com>
This manual page was written by Jan Dittberner <jandd@debian.org>, for the Debian project (but may be used by others).
rapid August 2010 RAPID(6)