Sponsored Content
Top Forums Shell Programming and Scripting How to exclude top level directory with find? Post 302136608 by siegfried on Tuesday 18th of September 2007 10:34:18 PM
Old 09-18-2007
But I don't want to remove that directory

I only want to delete files and not directories. How do I tell find to not traverse a certain top level directory? I've used prune before with file names but never with a top level directory.
Thanks,
Siegfried
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how do i exclude the current directory when using find?

i want to compile a list of files in all sub directories but exclude the current directory. the closest i could get was to search 'only' the current directory, which is the opposite of what i wanted. find . ! -name . -prune (7 Replies)
Discussion started by: mjays
7 Replies

2. Shell Programming and Scripting

Help needed removing two top level folders from path

Hi, I am trying to use either awk or sed to drop the first two folders in a path. So if I had path /folder1/folder2/folder3/folder4.... I need to drop folder1&2, so the new path would be /folder3/folder4... If folder1 and folder2 were the same all the time, this would be easy. But... (4 Replies)
Discussion started by: robertinohio
4 Replies

3. Shell Programming and Scripting

Exclude a directory in 'find'

Hi, I'm in the process of writing a shell script which will be ran under cron hourly and will check for files of specific age in my ftp folder, then moves those over inside a folder called "old" (which is within the ftp dir). But, I'm unable to figure out how to exclude the "old" folder when... (1 Reply)
Discussion started by: mutex1
1 Replies

4. Shell Programming and Scripting

SunOS: How to exclude directory in find command?

Hi All, First my OS version is: ksh:0$ uname -a SunOS 5.9 Generic_122300-48 sun4u sparc SUNW,Sun-Fire-V440 I want to exclude the following DIR(./country111) in my search pattern: ksh:0$ find . -name "*.tar" ./country111/COUNTRY_BATCH-801.tar ./country111/COUNTRY_BATCH-802.tar... (3 Replies)
Discussion started by: saps19
3 Replies

5. Ubuntu

[Solved] Using Find with an exclude/exclude file

I am familiar with using tar and exclude/include files: tar zcf backup.dirs.tgz --files-from=include.mydirs --exclude-from=exclude.mydirs --no-recursion but was wondering if I could use find in the same way. I know that you can just specify the directories to exclude but my list is... (2 Replies)
Discussion started by: metallica1973
2 Replies

6. UNIX for Dummies Questions & Answers

cmd find: exclude directory when using option -depth

hello, i want to use "-depth" in command "find" and want to exclude a directory. the find command should work in HP-UX and Linux. i see in the find man page: -prune If -depth is not given, true; do not descend the current directory. If -depth is given, false; no effect. -depth... (3 Replies)
Discussion started by: bora99
3 Replies

7. Shell Programming and Scripting

How to get top level parent directory

Hi All, I have a directory like this: /u01/app/oracle/11gSE1/11gR203 How do i get the top level directory /u01 from this? Tried dirname and basename but dint help. I can this using echo $ORACLE_HOME | awk -F"/" '{print "/"$2}'. But I am trying to find out if there is a better way of doing it... (4 Replies)
Discussion started by: nilayasundar
4 Replies

8. Shell Programming and Scripting

How-To Exclude Directory in find command

How can i tweak the below find command to exclude directory/s -> "/tmp/logs" find . -type f \( ! -name "*.log*" ! -name "*.jar*" \) -printNote: -path option/argument does not work with the version of find that i have. bash-3.2$ uname -a SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v (7 Replies)
Discussion started by: mohtashims
7 Replies

9. UNIX for Beginners Questions & Answers

Top 10 Users in mount level

Hi Members, I'm new to unix. Could you help me in solving my issue. My requirement is I need to pull Top 15 users in every mount. I could able to get the mount level information but I couldn't able to pull the top users in every mount. I see in every mount I could see a lot of nested... (3 Replies)
Discussion started by: UBEE
3 Replies
Tk_MoveToplevelWindow(3)                                       Tk Library Procedures                                      Tk_MoveToplevelWindow(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_MoveToplevelWindow - Adjust the position of a top-level window SYNOPSIS
#include <tk.h> Tk_MoveToplevelWindow(tkwin, x, y) ARGUMENTS
Tk_Window tkwin (in) Token for top-level window to move. int x (in) New x-coordinate for the top-left pixel of tkwin's border, or the top-left pixel of the decorative border supplied for tkwin by the window manager, if there is one. int y (in) New y-coordinate for the top-left pixel of tkwin's border, or the top-left pixel of the decorative border supplied for tkwin by the window manager, if there is one. _________________________________________________________________ DESCRIPTION
In general, a window should never set its own position; this should be done only by the geometry manger that is responsible for the win- dow. For top-level windows the window manager is effectively the geometry manager; Tk provides interface code between the application and the window manager to convey the application's desires to the geometry manager. The desired size for a top-level window is conveyed using the usual Tk_GeometryRequest mechanism. The procedure Tk_MoveToplevelWindow may be used by an application to request a particular position for a top-level window; this procedure is similar in function to the wm geometry Tcl command except that negative offsets cannot be speci- fied. It is invoked by widgets such as menus that want to appear at a particular place on the screen. When Tk_MoveToplevelWindow is called it does not immediately pass on the new desired location to the window manager; it defers this action until all other outstanding work has been completed, using the Tk_DoWhenIdle mechanism. KEYWORDS
position, top-level window, window manager Tk Tk_MoveToplevelWindow(3)
All times are GMT -4. The time now is 05:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy