Sponsored Content
Top Forums Shell Programming and Scripting Bash directory loop and order by creation date? Post 302987800 by RudiC on Friday 16th of December 2016 05:55:26 AM
Old 12-16-2016
How about, respecting the caveats by drl above:
Code:
ls -tcrd */ | while read DIRN; do echo "$DIRN"; done

This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. AIX

loop through the directory for files and sort by date and process the first file

hello i have a requirement where i have a direcotry in which i get files in the format STOCKS.20080114.dat STOCKS.20080115.dat STOCKS.20080117.dat STOCKS.20080118.dat i need to loop through the directory and sort by create date descending order and i need to process the first file. ... (1 Reply)
Discussion started by: dsdev_123
1 Replies

2. Shell Programming and Scripting

Grep by range of date from file creation in directory

Hi Expert, Need your scripting and finding data so that it help me to find the culprit of this memory usage error. Data provided here is a sample. Process Snapshot directory: /var/spool/processes-snapshot webdev9o9% pwd /var/spool/processes-snapshot webdev9o9% ls -lrct -rw-r--r-- ... (3 Replies)
Discussion started by: regmaster
3 Replies

3. Shell Programming and Scripting

Creation date of a directory

what's the command to find the creation date of a certain dirctory? (1 Reply)
Discussion started by: miss_dodi
1 Replies

4. Shell Programming and Scripting

Move files from one directory to another based on creation/modification date

Hi All, Really stuck up with a requirement where I need to move a file (Lets say date_Employee.txt--the date will have different date values like 20120612/20120613 etc) from one directory to another based on creation/modification dates. While visiting couple of posts, i could see we can... (3 Replies)
Discussion started by: dsfreddie
3 Replies

5. UNIX for Dummies Questions & Answers

Unable to find files, those can be present anywhere in the directory tree,based on its creation date

Hi I am unable to find files, those are present anywhere in the same directory tree, based on the creation date. I need to find the files with their path, as I need to create them in another location and move them. I need some help with a script that may do the job. Please help (2 Replies)
Discussion started by: sam192837465
2 Replies

6. Shell Programming and Scripting

Bash to create new directory by date followed by identifier and additional subdirectories

I have a bash that downloads a list and if that list has data in it then a new main directory is created (with the date) with several subdirectories (example1, example2, example3). My question is in that list there are portion of specific file types (.vcf.gz) - identifier towards the end that have... (0 Replies)
Discussion started by: cmccabe
0 Replies

7. Shell Programming and Scripting

Bash directory loop, but only choose those folders with specific word in it

Hello, how in bash i can get directory loop, but only choose those folders with specific word in it, so it will only echo those with specific word #!/bin/bash for filename in /home/test/* do if ; then echo $filename; fithx! (4 Replies)
Discussion started by: ZerO13
4 Replies

8. UNIX for Beginners Questions & Answers

Copy files in order of creation date

Hi everyone :-) I ran into a small issue. I would like to copy some files in the precise order they were created. So the oldest files should be copied first and the newest ones last. I tried cp -r $(ls -1t) ./destination but the files are still not sorted properly. I was thinking, that... (11 Replies)
Discussion started by: officiallyme
11 Replies

9. Shell Programming and Scripting

Reason for no directory creation date

i read here that linux provides no way to determine when a directory was created. https://www.unix.com/shell-programming-and-scripting/157874-creation-date-directory.htmlI have a directory /home/andy/scripts that had a README file in it. That file says I put the script in that directory and... (3 Replies)
Discussion started by: drew77
3 Replies

10. UNIX for Beginners Questions & Answers

Help with date in bash script for loop from YYYYMMDDHHMM

Hi everyone I need some help I want to create an script which does some processing it takes the two arguments 201901010000 and 201901020200 - so YYYMMDDHHMM I want to split processing into hours from start until end, I dont get why this works but when I add to a future variable... (1 Reply)
Discussion started by: kl1ngac1k
1 Replies
TCRD(1) 						      General Commands Manual							   TCRD(1)

NAME
tcrd - Tool for Class-Relationship Diagrams SYNOPSIS
tcrd [options] [document] DESCRIPTION
tcrd is an X11/Motif based graphical editor for drawing class-relationship diagrams. Documents can be loaded from and stored to a file. It can print documents to a PostScript printer or save as PostScript to a file. tcrd is part of The Toolkit for Conceptual Modeling (TCM). ARGUMENTS
You can call tcrd with a single document name as argument. If this argument is an existing file then tcrd tries to load a document from it. If it does not exist, a new document is created with the argument as document name. tcrd files should have suffix '*.crd'. Without a document argument, tcrd creates a new empty class-relationship diagram with the name 'untitled.crd'. In addition to the standard X11 toolkit options (see X11(7)), tcrd accepts the options listed below: -drawing widthxheight Create a drawing area of width pixels wide and height pixels high. -help Write all available options to standard output and quit. -maxdrawing widthxheight The drawing area can not be larger than width pixels wide and height pixels high. -priv_cmap Start the editor with a private colormap. -projdir directory Set the project directory (current working directory) to directory. -toPS [file.ps] Generate PostScript (to file.ps or stdout when no file name was given) and quit. -toEPS [file.eps] Generate EPS (to file.eps or stdout when no file name was given) and quit. -toFig [file.fig] [-latex] Generate Fig format (to file.fig or stdout when no file name was given and quit. When the -latex option is given, LaTeX fonts are generated, otherwise normal PostScript fonts are generated. The Fig format can be read by xfig(1) and fig2dev(1). -toPNG file.png Generate PNG format to file.png and quit. -toPS [file.ps] Generate PostScript (to file.ps or stdout when no file name was given) and quit. -version Write the TCM version to standard output and quit. ENVIRONMENT
The TCM_HOME environment variable should be the directory where the TCM files are installed. PATH Should include $TCM_HOME/bin MANPATH Should include $TCM_HOME/man PRINTER Name of the default printer that is used by tcrd. LD_LIBRARY_PATH Should include $TCM_HOME/lib when the distribution contains shared object libraries in $TCM_HOME/lib. FILES
The following relative files are relative to $TCM_HOME. bin/tcrd the class relationship diagram editor. bin/psf a program to filter PostScript output. lib/banner.ps PostScript banner page that can be used when the printer does not print a banner page. lib/help/* The help directory contains a collection of text files for the on-line help. lib/TCM X Resources (the same as the ones that are built-in). You can customize the fonts and colors by setting resources in your X defaults database. Each string of the form ``TCM.resource:definition'' sets a resource. /tmp/tcmXXXXXX Pseudo random temporary file, for PostScript output. lib/tcm.conf TCM editor configuration file. This file contains values for some of the editor defaults like the page size, the default fonts etc. This file is read by each editor upon startup. $HOME/.tcmrc Each user of TCM can override some of the options of tcm.conf by its own configuration file, installed in $HOME/.tcmrc. SEE ALSO
Frank Dehne, Roel Wieringa and Henk van de Zandschulp -- TCM (Toolkit for Conceptual Modeling), User's Guide and Reference. This document is available as PostScript and HTML in $TCM_HOME/doc or as HTML via the URL http://www.cs.utwente.nl/~tcm/tcm-usersguide.html. tcm(1), X11(7), xfig(1), fig2dev(1) AUTHOR
Frank Dehne (frank@cs.vu.nl). BUGS
Please send bug reports to tcm@cs.utwente.nl. 09 January 2000 TCRD(1)
All times are GMT -4. The time now is 05:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy