Sponsored Content
Full Discussion: Find problems
Top Forums Shell Programming and Scripting Find problems Post 302301417 by candyzouk on Thursday 26th of March 2009 07:54:48 PM
Old 03-26-2009
Find problems

Hey,

I was hoping for some help, my point was to search for all "core" files with only digits in the extension

Eg:
1) core.153498 < He should find it
2) core.1 < He should find it
3) core.919jasj < shouldn't find it
4) core.abdijs < shouldn't find it

Code:
find . -name 'core.[0-9]*' -printf "%s \t %p \n" -type f

What am I doing wrong here?
He finds the first 3 examples and I just want it to find the first 2..


Thanks for your time,
Bruno
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

'make' problems (compliation problems?)

I'm trying to compile and install both most recent version of 'make' and the most recent version of 'openssh' on my Sparc20. I've run into the following problems... and I don't know what they mean. Can someone please help me resolve these issues? I'm using the 'make' version that was... (5 Replies)
Discussion started by: xyyz
5 Replies

2. Shell Programming and Scripting

find: problems escaping printf-command string

Hi Folks! Can you help me with this find -printf command. I seem to be unable to execute the printf-command from my shell script. I'm confused: :confused: My shell script snippet looks like this: #!/bin/sh .. COMMAND="find ./* -printf '%p %m %s %u %g \n'" echo "Command: ${COMMAND}"... (1 Reply)
Discussion started by: grahamb
1 Replies

3. UNIX for Dummies Questions & Answers

Problems with find command

Folks, I have been searching a dir for specfic files that have been accessed within a certain timeframe. The issue that I am having is that it picks up the .snapshot dir as well. I am using the following: find /probecards/ -name "S25E3N*" -mtime -1 -type f Is this correct or how do I... (4 Replies)
Discussion started by: lodey
4 Replies

4. Shell Programming and Scripting

find & dirname:problems with white spaces in Directories

Hi all, my problem: (little extract from my bash-script) I want to move each file (.mov) from one directory (and many Subdirectories) to another directory (only one); after moving i want to create hardlinks to the old directories. Thatīs no problem, but now: source-directories... (4 Replies)
Discussion started by: tubian
4 Replies

5. Shell Programming and Scripting

Problems with find's -newer Flag

I am writing a script that looks in a reports directory, copies a specified script to a working folder, copies some data files into the working folder, runs the report, zips the new files, then uploads them. Right now to determine what files to zip (as I don't know how many report files there... (6 Replies)
Discussion started by: droppedonjapan
6 Replies

6. UNIX for Dummies Questions & Answers

Problems with find & -size

Hi I am trying to find files over a size given by the user. this is what I have so far echo "Enter a pathname to check (example = /home/jsk1gcc/testwork): " read input echo "Enter a the size (examples = 100k, 10M, 1G): " read size find $input -size +$size echo echo "Hit the Enter... (2 Replies)
Discussion started by: AngelFlesh
2 Replies

7. Shell Programming and Scripting

Execution problems with Find

the below cmd is not wrking in perl script find . -name "*e*" -exec wc -l {} \; its show the following error Can't modify system in scalar assignment at prjt.pl line 4, near ");" Execution of prjt.pl aborted due to compilation errors. (11 Replies)
Discussion started by: natraj005
11 Replies

8. Shell Programming and Scripting

Problems with find | ls within a for statement

Hello, for dir in `find /root/test -type d` ;do echo "$dir" done for dir in `ls -1d /root/test/*/` ;do echo "$dir" done If there's a directory with spaces in name, it does echo each word of that dir separately... solution? mkdir "test" cd test mkdir "example_1_2_3"... (6 Replies)
Discussion started by: TehOne
6 Replies

9. Shell Programming and Scripting

problems with ksh array and find command

set -A allfiles `find $usrhtml -type f` i am trying to populate this array with the find command. It works fine when find is looking through a single directory but when i add a new subdirectory the files in the subdirectory get duplicated. Can anyone help me and fix this so each files in... (1 Reply)
Discussion started by: bjhum33
1 Replies

10. Shell Programming and Scripting

Problems with script to find file names

Have a text file "test-array.txt" with contents below a23003 b23406 c23506 Tying to read the above file into an array and search for file-names in a directory TEST_DIR ,recursively with the above names in them. Example: If TEST_DIR has a files named xyxa_a23003_test.sql,... (4 Replies)
Discussion started by: gaurav99
4 Replies
gcore(1)							   User Commands							  gcore(1)

NAME
gcore - get core images of running processes SYNOPSIS
gcore [-pgF] [-o filename] [-c content] process-id... DESCRIPTION
The gcore utility creates a core image of each specified process. By default, the name of the core image file for the process whose process ID is process-id will be core.process-id. OPTIONS
The following options are supported: -c content Produces core image files with the specified content. The content description uses the same tokens as in coreadm(1M). The -c option does not apply to cores produced due to the -p or -g flags. -F Force. Grabs the target process even if another process has control. -g Produces core image files in the global core file repository with the global content as configured by coreadm(1M). The com- mand will fail if the user does not have permissions to the global core file repository. -o filename Substitutes filename in place of core as the first part of the name of the core image files. filename can contain the same tokens to be expanded as the paths in coreadm(1M). -p Produces a core image file in the process-specific location with the process-specific content for each process as config- ured by coreadm(1M). The command will fail if the user does not have permissions to the per-process core file repository. OPERANDS
The following operand is supported: process-id process ID EXIT STATUS
The following exit values are returned: 0 On success. non-zero On failure, such as non-existent process ID. FILES
core.process-id core images ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWtoo | +-----------------------------+-----------------------------+ |Interface Stability |See below. | +-----------------------------+-----------------------------+ Command Syntax is Evolving. Output Format(s) are Unstable. SEE ALSO
kill(1), coreadm(1M), setrlimit(2), core(4), proc(4), attributes(5) NOTES
gcore is unaffected by the setrlimit(2) system call using the RLIMIT_CORE value. SunOS 5.10 11 Feb 2004 gcore(1)
All times are GMT -4. The time now is 09:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy