Howdy,
I'm trying to figure out how to move multiple files based on their creation date. If anyone can enlighten me it would be most appreciated!!
Thanks!
:D (1 Reply)
Hi All,
I am currently coding for a requirement(LINUX OS) where I am supposed to move a file (Lets Call it Employee.txt) from Directory A to Directory B based on 2 date fields as below,
Date_Current = 20120620
Date_Previous = 20120610
Source Directory : /iis_data/source
Target... (11 Replies)
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)
I'm using a directory naming convention to organize files as exemplified here:
2012/Aug/week-20-Aug/23-Thu/tuv.txt
2012/Aug/week-27-Aug/30-Thu/abc.txt
2012/Sep/week-27-Aug/01-Sat/def.txt
2012/Sep/week-03-Sep/07-Fri/xyz.txt
How do I write a command that will list the file names abc.txt and... (4 Replies)
Hi All,
<Re-posting in Correct group>
I'm trying to select all the files in a folder that starts with a particular name format and are created in a gven date range using 'ls' command...but i'm not successful....
Example : I'm trying to see all the text files in a folder who names start... (6 Replies)
Hi,
My apologies if my query is already available on this forum but I am new and could not find.
I need a script to list all directories/sub directories and files with permissions/groups/owners. The script would run from home directory and should capture every directory. How do I do this?
... (4 Replies)
My unix version is IBM AIX Version 6.1
I tried google my requirement and found the below answer,
find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20"
But newer command is not working in AIX version 6.1 unix
I have given my requirement below:
Input:
atr files:
... (1 Reply)
I'm wanting to write a bourne shell script that takes in two command line arguments - a directory and a file. With this I want to return a list of files within the directory that are older (based on creation date) than the given file, and print the number of files that have not been listed (they... (4 Replies)
Hi All,
I've been trying to do some recursive searching but not been very successful. Can someone please help.
Scenario:
I have directory structure
/dir1/dir2/dir3/
2019/
11/
17
18
19
20
so what I want to do is run a script and as its 2019/11/18/ today it would go and only search... (3 Replies)
Discussion started by: israr75
3 Replies
LEARN ABOUT REDHAT
tree
TREE(1) General Commands Manual TREE(1)NAME
tree - list contents of directories in a tree-like format.
SYNOPSIS
tree [ -adfgilnpqstuxACDFN ] [ -P pattern ] [ -I pattern ] [ directory ... ]
DESCRIPTION
Tree is a recursive directory listing program that produces a depth indented listing of files. Color is supported ala dircolors if the
LS_COLORS environment variable is set, output is to a tty, and the -C flag is used. With no arguments, tree lists the files in the current
directory. When directory arguments are given, tree lists all the files and/or directories found in the given directories each in turn.
Upon completion of listing all files/directories found, tree returns the total number of files and/or directories listed.
By default, when a symbolic link is encountered, the path that the symbolic link refers to is printed after the name of the link in the
format:
name -> real-path
If the `-l' option is given and the symbolic link refers to an actual directory, then tree will follow the path of the symbolic link as if
it were a real directory.
OPTIONS
Tree understands the following command line switches:
-a All files are printed. By default tree does not print hidden files (those beginning with a dot `.'). In no event does tree print
the file system constructs `.' (current directory) and `..' (previous directory).
-d List directories only.
-f Prints the full path prefix for each file.
-i Makes tree not print the indentation lines, useful when used in conjunction with the -f option.
-l Follows symbolic links if they point to directories, as if they were directories.
-x Stay on the current file-system only. Ala find -xdev.
-P pattern
List only those files that match the wild-card pattern. Note: you must use the -a option to also consider those files beginning
with a dot `.' for matching. Valid wildcard operators are `*' (any zero or more characters), `?' (any single character), `[...]'
(any single character listed between brackets (optional - (dash) for character range may be used: ex: [A-Z]), and `[^...]' (any sin-
gle character not listed in brackets).
-I pattern
Do not list those files that match the wild-card pattern.
-p Print the protections for each file (as per ls -l).
-s Print the size of each file along with the name.
-u Print the username, or UID # if no username is available, of the file.
-g Print the group name, or GID # if no group name is available, of the file.
-D Print the date of the last modification time for the file listed.
-F Append a `/' for directories, a `=' for socket files, a `*' for executable files and a `|' for FIFO's, as per ls -F
-q Print non-printable characters in filenames as question marks instead of the default caret notation.
-N Print non-printable characters as is instead of the default caret notation.
-t Sort the output by last modification time instead of alphabetically.
-n Turn colorization off always, over-ridden by the -C option.
-C Turn colorization on always, unless the LS_COLORS environment variable is not set. Useful to colorize output to a pipe.
-A Turn on ANSI line graphics hack when printing the indentation lines.
FILES
/etc/DIR_COLORS System color database.
~/.dircolors Users color database.
ENVIRONMENT
LS_COLORS Color information created by dircolors
AUTHOR
Steve Baker (ice@mama.indstate.edu)
BUGS
None known. Not heavily tested. Needs a few more options, ala ls.
SEE ALSO dircolors(1L), ls(1L)UNIX Programmer's ManualTREE(1)