07-17-2006
recognizing *.* in find
hi folks,
I am trying to write a script for deleting all the files which are older than "N" days from current directory.
CODE:
FileName="*.*"
NumDays=-1
echo $FileName
echo $NumDays
find * -prune -name $FileName -mtime $NumDays -exec rm {} \;
Now the problem here is when i am trying to print the 'FileName' variable here its printing all the files here and not "*.*" so the 'find ' statement is not working .(its not deleting the files)
I have tried with "\*" char also but its not working .
How to do that ??
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a short script that takes a filename and secure copies the file to a remote machine. i'd like to be able to take a * character and secure copy all the files in the directory.
first of all, how would i compare $1 to see if it's a * character?
if or didn't do it.
second question is... (3 Replies)
Discussion started by: csejl
3 Replies
2. Linux
Hi All,
I am using crontab which execute a shell script.
In the shell script, I am executing a java program. This Java program requires the jar files.
The cron job file ' cronfile.txt ' contents:
MAILTO="raju_utla@dcis.uohyd.ernet.in"
0-59 * * * *... (3 Replies)
Discussion started by: rajuutla
3 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I am using crontab which execute a shell script.
In the shell script, I am executing a java program. This Java program requires the jar files.
The cron job file ' cronfile.txt ' contents:
MAILTO="raju_utla@dcis.uohyd.ernet.in"
0-59 * * * *... (4 Replies)
Discussion started by: rajuutla
4 Replies
4. Shell Programming and Scripting
I will be passing an argument to a csh script
The script can be either of two forms
For example, either
script.csh zloc=5/10
or
script.csh zloc=5/10/20
So there can be either two values or three values. How can I distinguish which one the user has inputted?
I have made... (1 Reply)
Discussion started by: kristinu
1 Replies
5. Shell Programming and Scripting
Must be a bug or something. Whether I escape them or not, it will not work. No matter what I set the minimum and maximum to nothing gets caught. For instance:
find / -regex "/.{0, 50}.*" -maxdepth 1 or find / -regex "/.\{0, 50\}.*" -maxdepth 1 should pretty much catch everything residing within... (4 Replies)
Discussion started by: stevensw
4 Replies
6. Solaris
Hello,
I've read many posts that offer tips on how to mount a CDROM but I haven't seen any on how to get the system to recognize the CDROM drive.
I was transferring files from CDROM to the hard drive successfully. I entered the third CDROM and the system refused to automount it. I tried... (2 Replies)
Discussion started by: TrueSon
2 Replies
7. Red Hat
Hello,
I re-installed my laptop and installed a new copy of VMBOX, I created a VM Machine with my Rhel5 and a CEntos copy as well.
I am using a laptop HP DV4, I use wireless on the laptop.
Usually when I boot up in to either machine I would get eht0 and lo as usual now I just don't get... (4 Replies)
Discussion started by: NelsonC
4 Replies
8. Shell Programming and Scripting
hi folks,
please help me with this, my bash script is not recognizing veritas cluster commands, giving error such as "bash: hastatus: command not found".
the piece of code is
ssh -p 22022 test02 'hastatus -sum |grep j2ee|grep -i online' > /tmp/j2ee.log (2 Replies)
Discussion started by: gauravsharma29
2 Replies
9. Filesystems, Disks and Memory
Hi,
I need to know what are the storages attached to some of our corporate servers. I run this command from the server only to get a list of WWNs :
# /usr/local/bin/evainfo -a
Devicefile Array WWNN Capacity ... (1 Reply)
Discussion started by: anaigini45
1 Replies
10. Shell Programming and Scripting
Sorry I put -r I ment to out -w but its not perform none of -w, -r, -x flags
Using centos 6.4
#!/bin/bash
echo -e "enter the name of file :\c"
read file_name
if
then
if
then
echo "Type some text date. Tp quit press crtl-"
cat >> $file_name
... (2 Replies)
Discussion started by: zbest1966
2 Replies
ppdc(1) Apple Inc. ppdc(1)
NAME
ppdc - cups ppd compiler
SYNOPSIS
ppdc [ -D name[=value] ] [ -I include-directory ] [ -c message-catalog ] [ -d output-directory ] [ -l language(s) ] [-m] [-t] [ -v ] [ -z ]
[ --cr ] [ --crlf ] [ --lf ] source-file
DESCRIPTION
ppdc compiles PPDC source files into one or more PPD files.
The -D option sets the named variable for use in the source file. It is equivalent to using the #define directive in the source file.
The -I option specifies an alternate include directory; multiple -I options can be supplied to add additional directories.
The -c option specifies a single message catalog file in GNU gettext source format (filename.po) to be used for localization.
The -d option specifies the output directory for PPD files. The default output directory is "ppd".
The -l option specifies one or more languages to use when localizing the PPD file(s). The default language is "en" (English). Separate mul-
tiple languages with commas, for example "de_DE,en_UK,es_ES,es_MX,es_US,fr_CA,fr_FR,it_IT" will create PPD files with German, UK English,
Spanish (Spain, Mexico, and US), French (France and Canada), and Italian languages in each file.
The -m option specifies that the output filename should be based on the ModelName value instead of FileName or PCFilenName.
The -t option specifies that PPD files should be tested instead of generated.
The -v option provides more verbose output, basically a running status of which files are being loaded or written.
The -z option generates compressed PPD files (filename.ppd.gz). The default is to generate uncompressed PPD files.
The --cr, --crlf, and --lf options specify the line ending to use - carriage return, carriage return and line feed, or line feed. The
default is to use the line feed character alone.
SEE ALSO
ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5)
http://localhost:631/help
COPYRIGHT
Copyright 2007-2011 by Apple Inc.
10 October 2008 CUPS ppdc(1)