07-27-2005
Quote:
Originally Posted by ecupirate1998
Hey guys,
I would like to find all files which contain "client1.dat". I would like to search from the current directory and all subs and print out all the files that have this. Any help would be greatly appreciated.
Thanks much.
"which contain 'client1.dat'"
what do you actually want?,.. show what directory (or subdirectory) contains a file client1.dat or what file in each dir or subdir contains the word "client1.dat"?
for print each client1.dat in dir or subdirs
#printername is your printername configured in your /etc/printcap file
for i in `find . -name "client1.dat" -print`; do lp -d printername $i; done
best regards!
Last edited by infierno; 07-27-2005 at 04:45 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Folks,
In a Unix (ksh) script, is there a way to determine the current working directory path of another logged-in user? Of course, I can use "pwd" to find my own path. But, how do I find it for another active user?
Thanks for any input you can provide. LY (6 Replies)
Discussion started by: liteyear18
6 Replies
2. Shell Programming and Scripting
Hello,
I am having problem in setting current working directory from shell.
I want to set pwd as an environmental variable in a script. I am following an existing script which is defined as
HOME=$(shell dirname `pwd`)
C_HOME=$(shell echo $(HOME) | sed -e 's:\/:\\\/:g' )
But when I am trying... (3 Replies)
Discussion started by: chandra004
3 Replies
3. UNIX for Dummies Questions & Answers
I am in Linux and would like to use the -d skip option for skipping directories in a grep search. What is the order of switches and strings?
switches I'd like to use: -irl -d skip '/dirtoskip'
text I am searching for: 'fax'
dir in which to begin: /var/www/kewbie/*
How should I... (1 Reply)
Discussion started by: kewbie
1 Replies
4. UNIX and Linux Applications
HI all, I got a CPIO archive that contains a unix filesystem that I try to extract, but it extract to the root dir / unstead of current dir, and happily it detects my file are newer otherwise it would have overwrited my system's file!
I tried all these commands
cpio -i --make-directories <... (2 Replies)
Discussion started by: nekkro-kvlt
2 Replies
5. Shell Programming and Scripting
Hello!!
I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory:
drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies
6. Shell Programming and Scripting
Dear Members,
I have a list of xml files like
abc.xml.table
prq.xml.table
...
..
.
in a txt file.
Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file.
Please help me with the script or command to do so.
... (11 Replies)
Discussion started by: Yoodit
11 Replies
7. Emergency UNIX and Linux Support
Hi Experts,
I want to find all the dirs , subdirs on the sever which start with "sr".
Can anyone let me know command for the same.
find . -type d -name sr* I tried this but it is not working.
Thanks,
Ajay (4 Replies)
Discussion started by: ajaypatil_am
4 Replies
8. Shell Programming and Scripting
i have directory /abcd and i want to copy all today date files in /xyz directory.
i am able to see the files by using below command but not able to understand copy.
find . -mtime -1 -type f -exec ls -l {} \; (2 Replies)
Discussion started by: learnbash
2 Replies
9. Shell Programming and Scripting
Hi
i want to copy all the files of current date in another directory.
for example, below i want to save all the file of 26 march to copied in debug dir.
$ ls -lrt | tail -5
-rwxrwxrwx 1 khare guest 73 Jan 6 12:35 chk
-rw-r--r-- 1 khare guest 770 Mar 26 02:21 cc1... (2 Replies)
Discussion started by: scriptor
2 Replies
10. Shell Programming and Scripting
Hello,
I need to replace xml version='1.1' with xml version='1.0' in all xml files under /app/jenkins/ in all dir and sub dirs in my CentOS VM, I tried below command but it didn't help, looks like I'm missing a character somewhere.
grep -rl "xml version='1.1'" . | xargs sed -i 's/"xml... (2 Replies)
Discussion started by: mahesh Madpathi
2 Replies
kst(1) kst2 kst(1)
NAME
kst -- plots scientific data
SYNOPSIS
kst
kst [ -F DATASOURCE ] [ -f STARTFRAME ] [ -n NUMFRAMES ] [ -s FRAMESPERSAMPLE [ -a ] ] kstfile
kst datasource [ -f STARTFRAME ] [ -n NUMFRAMES ] [ -s FRAMESPERSAMPLE [ -a ] ] [ -P PLOTNAME ] [ -A] [ -d ] [ -l ] [ -b ] [ -x FIELD ]
[ -e FIELD ] [ -r RATE ] [ -y FIELD ] [ -p FIELD ] [ -h FIELD ] [ -z FIELD ] [ --png filename ] [ --print filename [ --landscape |
--portrait ] [ --Letter | --A4 ] ]
DESCRIPTION
kst is a graphical data plotting tool, which includes the ability to plot live data (contiuously update the plot as new data becomes avail-
able).
kst may be run entirely from within its GUI, in which case no command line arguments are needed. kst has a powerful wizard for easily set-
ting up new plots.
In the second invocation, kst loads pre-saved plot specifications from the file kstfile and optionally may override some of the settings in
that file.
In the third invocation, kst displays plots of the data as directed in the default manner. Additional datasources may be specified on the
command line with options for that datasource following it. Command line options generally apply to all subsequent options unless later
overridden.
OPTIONS
-A plot all curves in separate plots
-a average frames (simple mean) when plotting with -s.
--A4 use A4 sized paper for printing. Requires --print.
-b plot as bargraphs.
-d use points when plotting curves.
-e FIELD
use FIELD as the magnitude of error bars applied to the next plot.
-F datasource
override the datasource indicated in the kstfile and instead use datasource.
-f STARTFRAME
begin plotting at STARTFRAME frames into the data. Set to -1 to start at NUMFRAMES from the end of the data.
-h FIELD
plot FIELD as a histogram.
-l use lines when plotting curves.
--landscape
use landscape orientation for printing. Requires --print. --Letter use US Letter sized paper for printing. Requires --print.
-n NUMFRAMES
plot at most NUMFRAMES frames of data. Set to -1 to indicate all of the data.
-P PLOTNAME
plot all plots in the plot named PLOTNAME.
-p FIELD
plot FIELD as a power spectrum plot.
--png filename
render to a portable network graphics (png) image with file name filename and quit.
--portrait
use portrait orientation for printing. Requires --print.
--print filename
print the plot to file filename and quit.
-s FRAMESPERSAMPLE
plot every FRAMESPERSAMPLE frames when plotting.
-x FIELD
use FIELD as the X-axis vector.
-y FIELD
plot FIELD as an XY plot.
-z FIELD
plot FIELD as an image.
EXAMPLES
Plot all data in column 2 from data.dat.
kst data.dat -y 2
Same as above, except only read 20 lines, starting at line 10.
kst data.dat -f 10 -n 20 -y 2
also read col 1. One plot per curve.
kst data.dat -f 10 -n 20 -y 1 -y 2
Read col 1 from data2.dat and col 1 from data.dat
kst data.dat -f 10 -n 20 -y 2 data2.dat -y 1
Same as above, except read 40 lines starting at 30 in data2.dat
kst data.dat -f 10 -n 20 -y 2 data2.dat -f 30 -n 40 -y 1
Specify the X vector and error bars: Plot x = col 1 and Y = col 2 and error flags = col 3 from data.dat
kst data.dat -x 1 -e 3 -y 2
Get the X vector from data1.dat, and the Y vector from data2.dat.
kst data1.dat -x 1 data2.dat -y 1
Placement: Plot column 2 and column 3 in plot P1 and column 4 in plot P2
kst data.dat -P P1 -y 2 -y 3 -P P2 -y 4
BUGS
Please report bugs to either the kst mailing list at kst@kde.org or to the kde bugzilla under the kst product at http://bugs.kde.org/. If
you can run kst, you can easily report bugs by selecting Bug Report Wizard from the Help menu.
AUTHOR
Matthew Truch <matt@truch.net>
LICENSE
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the `COPYING.DOC' file as part of the kst distribution.
Version 2.0.3 22 February 2011 kst(1)