Sponsored Content
Top Forums Shell Programming and Scripting Find cmd not working as expected Post 302134065 by porter on Tuesday 28th of August 2007 02:48:02 PM
Old 08-28-2007
try -maxdepth as follows..

Code:
       -maxdepth levels
              Descend at most levels (a non-negative integer) levels of direc-
              tories below the command line arguments.   `-maxdepth  0'  means
              only  apply the tests and actions to the command line arguments.

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

which not working as expected

Hello. Consider the following magic words: # ls `which adduser` ls: /usr/sbin/adduser: No such file or directory # Hmmm... Then: # ls /usr/sbin/adduser /usr/sbin/adduser # Now what? Unforunately this little sniippet is used in my debian woody server's mysql pre install script.... (2 Replies)
Discussion started by: osee
2 Replies

2. Shell Programming and Scripting

su cmd not working

HI all, i want to run various Unix cmds thru a java prg. following is the code which i have written. ------------------------------------------------------------------- import java.io.*; class Run { public static void main(String args) { String ls_str; try{ Process cmd_su =... (1 Reply)
Discussion started by: sonbag_pspl
1 Replies

3. UNIX for Dummies Questions & Answers

Find command not working as expected

I have a script with a find command using xargs to copy the files found to another directory. The find command is finding the appropriate file, but it's not copying. I've checked permissions, and those are all O.K., so I'm not sure what I'm missing. Any help is greatly appreciated. This is... (2 Replies)
Discussion started by: mpflug
2 Replies

4. Solaris

Find cmd working in Linux and not in SunSolaris 5.8

find . -type f -mtime -1 -ls command not working in sun solaris 5.8 (4 Replies)
Discussion started by: navjotbaweja
4 Replies

5. Shell Programming and Scripting

Find cmd not working correctly in script

I am trying to copy 2 types of files so I can archive them. I tested with a set of commands: touch -t $(date -d "-60 day" +%Y%m%d) WORKDIR/REF find TARGETDIR/ -type f -maxdepth 1 -iname \*.out\* -or -iname \*.log\* ! -newer WORKDIR/REF -exec ls -l {} \; This correctly lists any files in the... (2 Replies)
Discussion started by: prismtx
2 Replies

6. Shell Programming and Scripting

Why this is not working in expected way?

total=0 seq 1 5 | while read i ; do total=$(($total+$i)) echo $total done echo $totalThis outputs: 1 3 6 10 15 0whereas I am expecting: 1 3 6 10 15 15My bash version: (4 Replies)
Discussion started by: meharo
4 Replies

7. Red Hat

how passwd cmd is working

how unix users able to change their password even if they have only read permissions and how backend process will be happening can u explain me which are files need to involved in this process (3 Replies)
Discussion started by: ponmuthu
3 Replies

8. Shell Programming and Scripting

basename not working as expected from find -exec

I have the following files in a directory > ls -1 /tmp/test/dir/ file with spaces 1.ogg file with spaces 2.oggI am running the following to echo the filenames but alter the file extension on the files to .mp3 instead of .ogg ( I am going to run ffmpeg against the files ultimately, but keeping... (2 Replies)
Discussion started by: jelloir
2 Replies

9. UNIX for Advanced & Expert Users

Test -e not working as expected (by me)

I ran into the following and still do not understand entirely the rationale behind this. If someone could explain why things are as they are I'd be thankful. The following was tested on AIX 7.1 with ksh88, but i suspect that to be ubiquitous. In an installation routine i had to create a set of... (6 Replies)
Discussion started by: bakunin
6 Replies

10. UNIX for Advanced & Expert Users

Manipulate files with find and fuser not working as expected on SunOs

Greetings, For housekeeping, I use the following command: find /some/path -type f -name "*log*" ! -exec fuser -s "{}" 2>/dev/null \; -exec ls -lh {} \; It finds all log files not currently in use by a process and manipulates them. This command always works on linux and redhat machines,... (2 Replies)
Discussion started by: dampio
2 Replies
map::slippy::fetcher(n) 					 Mapping utilities					   map::slippy::fetcher(n)

__________________________________________________________________________________________________________________________________________________

NAME
map::slippy::fetcher - Accessing a server providing tiles for slippy-based maps SYNOPSIS
package require Tcl 8.4 package require Tk 8.4 package require img::png package require map::slippy package require map::slippy::fetcher ?0.2? ::map::slippy::fetcher fetcherName levels url fetcherName levels fetcherName tileheight fetcherName tilewidth fetcherName get tile donecmd _________________________________________________________________ DESCRIPTION
This package provides a class for accessing http servers providing tiles for slippy-based maps. API
::map::slippy::fetcher fetcherName levels url Creates the fetcher fetcherName and configures it with the number of zoom levels supported by the tile server, and the url it is listening on for tile requests. The result of the command is fetcherName. METHODS fetcherName levels This method returns the number of zoom levels supported by the fetcher object, and the tile server it is accessing. fetcherName tileheight This method returns the height of tiles served, in pixels. fetcherName tilewidth This method returns the width of tiles served, in pixels. fetcherName get tile donecmd This is the main method of the fetcher, retrieving the image for the specified tile. The tile identifier is a list containing three elements, the zoom level, row, and column number of the tile, in this order. The command refix donecmd will be invoked when the fetcher either knows the image for the tile or that no image will forthcoming. It will be invoked with either 2 or 3 arguments, i.e. [1] The string set, the tile, and the image. [2] The string unset, and the tile. These two possibilities are used to either signal the image for the tile, or that the tile has no image defined for it. REFERENCES
[1] http://wiki.openstreetmap.org/wiki/Main_Page KEYWORDS
http, location, map, server, slippy, tile, url, zoom map 0.2 map::slippy::fetcher(n)
All times are GMT -4. The time now is 08:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy