Sponsored Content
Top Forums Shell Programming and Scripting Traverse Directory Tree for backup Post 302088361 by reborg on Monday 11th of September 2006 06:16:05 PM
Old 09-11-2006
No duplicate thread or cross-posting - closed.
 

10 More Discussions You Might Find Interesting

1. Programming

Directory tree search???

Hi all, I've got a problem, what function do i use to list the contents of all the directory tree (simular to "find")? Any other suggestions? Thank you all (3 Replies)
Discussion started by: solvman
3 Replies

2. Programming

directory as tree

hi i have modified a program to display directory entries recursively in a tree like form i need an output with the following guidelines: the prog displays the contents of the directory the directory contents are sorted before printing so that directories come before regular files if an entry... (2 Replies)
Discussion started by: anything2
2 Replies

3. Shell Programming and Scripting

Searching directory tree

I'm currently trying to write a script that will do the following: search a given directory tree for a file with MMDDYYYY in the name. delete those files only. I can't figure out how to make the script delete the files with the MMDDYYYY in the filename after finding them. Should I export... (7 Replies)
Discussion started by: blane
7 Replies

4. Shell Programming and Scripting

directory tree

Hi all, The following is a script for displaying directory tree. D=${1:-`pwd`} (cd $D; pwd) find $D -type d -print | sort | sed -e "s,^$D,,"\ -e "/^$/d"\ -e "s,*/\(*\)$,\:-----\1,"\ -e "s,*/,: ,g" | more exit 0 I am trying to understand the above script.But... (3 Replies)
Discussion started by: ravi raj kumar
3 Replies

5. UNIX for Dummies Questions & Answers

Move all files in a directory tree to a signal directory?

Is this possible? Let me know If I need specify further on what I am trying to do- I just want to spare you the boring details of my personal file management. Thanks in advance- Brian- (2 Replies)
Discussion started by: briandanielz
2 Replies

6. Shell Programming and Scripting

Traverse through directory....

hi I have a directory structure like Parent Parent/child1/ Parent/child2/ Parent/child3/ and the each main directory contains Parent/child1/file1.txt, Parent/child1/fil2.zip ....... Parent/child2/file1.txt,Parent/child/fil2.zip ...... Now i want to traverse to each and want to... (1 Reply)
Discussion started by: Reddy482
1 Replies

7. UNIX for Dummies Questions & Answers

directory tree with directory size

find . -type d -print 2>/dev/null|awk '!/\.$/ {for (i=1;i<NF;i++){d=length($i);if ( d < 5 && i != 1 )d=5;printf("%"d"s","|")}print "---"$NF}' FS='/' Can someone explain how this works..?? How can i add directory size to be listed in the above command's output..?? (1 Reply)
Discussion started by: vikram3.r
1 Replies

8. Shell Programming and Scripting

How to traverse directory structure and sum size of files?

How do I write a bash or ruby or perl or groovy script to print all the files in my directory tree that are one-to-two years old, the size of each file, and the sum of file sizes and then delete them? I was using find . -atime +365 -exec rm '{}' \; but the problem was that I could not... (5 Replies)
Discussion started by: siegfried
5 Replies

9. Shell Programming and Scripting

Specific directory parsing in a directory tree

Hi friends, Hello again :) i got stuck in problem. Is there any way to get a special directory from directory tree? Here is my problm.." Suppose i have one fix directory structure "/abc/xyz/pqr/"(this will be fix).Under this directory structure i have some other directory and... (6 Replies)
Discussion started by: harpal singh
6 Replies

10. Shell Programming and Scripting

Traverse Latest directory First

I wish to traverse the latest to the oldest directory based on its timestamp. ls -ltr drwxr-x--- 3 admin bel 1024 Jan 22 02:29 sys drwxr-x--- 2 admin bel 2048 Jan 22 02:30 admin drwxr-x--- 10 admin bel 24576 Jan 23 21:31 bin For the above i need to cd first to... (2 Replies)
Discussion started by: mohtashims
2 Replies
INSTALLIT(1)						      General Commands Manual						      INSTALLIT(1)

NAME
installit - file/directory installation tool SYNOPSIS
installit [ -o owner ] [ -g group ] [ -O owner ] [ -G group ] [ -m mode ] [ -b backup ] [ -s ] [ -t ] source destination DESCRIPTION
Installit puts a copy of source into the specified destination. If source is a period, then destination is taken to be the name of a directory that should be created. Otherwise, source is taken to name an existing file and destination may be either a file or directory; it is interpreted according to the same rules as cp(1). Installit uses no special privileges to copy files from one place to another. OPTIONS
-b If destination names a pre-existing file, it will be removed before the copy is done. To make a backup copy, use the ``-b'' flag; the existing file will be renamed to have the specified extension. If source and destination are the same string, or if the two files are identical, then no copying is done, and only the ``-o'', ``-g'', ``-m'', and ``-s'' flags (see below) are processed. In this case, the modification time on the destination will be updated using touch(1). -n Do not update the modification time on the destination. -o -g -m Once the destination has been created, it is possible to set the owner, group, and mode that it should have. This is done by using the ``-o'', ``-g'', and ``-m'' flags, respectively. -O -G The ``-O'' and ``-G'' flags set the owner and group only if installit is being run by root, as determined by whoami(1). -s To strip(1) an installed executable, use the ``-s'' flag. BUGS AND LIMITATIONS
Flags cannot be combined. The chown(8) command must exist in either the /etc or /usr/etc directory or the user's PATH. The whoami command must exist in the /usr/ucb directory or the user's PATH. HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.9, dated 1996/10/29. INSTALLIT(1)
All times are GMT -4. The time now is 12:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy