Hi,
I am trying to write a script that will use ls on a directory and list the files one at a time and their size. If the size is 0 i want it to ask me if I want to delete it (yes or no). If I say yes, I want it to delete but it won't know what the file name is just from running from the script.... (2 Replies)
Hi,
I am facing the below problem
I have a list of number to be searched(around 1000) files resideing in multiple directories as i dont know where it resides in. for example
search string is like (abc)123456
please help. very urgent
Thanks a lot
Uma (3 Replies)
I have the below directory in unix environment
/home/bkup/daily: ls -lrt
drwxrwx--x 2 user user 256 Jan 12 18:21 20110112/
drwxrwx--x 2 user user 256 Jan 13 17:06 20110113/
drwxrwx--x 2 user user 256 Jan 14 16:44 20110114/
drwxrwx--x 2 user user ... (2 Replies)
I have multiple files that starts as TRADE_LOG spread across multiple folders in the given structure..
./dir1/1/TRADE_LOG*.gz
./dir2/10/TRADE_LOG*.gz
./dir11/12/TRADE_LOG*.gz
./dir12/13/TRADE_LOG*.gz
when I do ftp uisng mput from the "." dir I am getting the below given error
mput... (1 Reply)
need a Command in UNIX which can find out a word from files in multiple directories
e.g.
/home contains multiple directories
/home/d1
/home/d2
.
.
.
.
/home/dn
under d1,d2...dn contains multiple files. I need to search a specific word in a files under these multiple... (1 Reply)
Hi,
I want to access files from different directories (for example: /home/dir1/file1 , /home/dir2/file2 ...) Like this i have to access these files(file1, file2...). (3 Replies)
Hi,
I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them.
Each of... (20 Replies)
So I have extremely limited experience with shell scripting and I was hoping someone could point out a few commands I need to use in order to pull this off with a shell script like BASH or whatnot (this is on OS X).
I need to search out for filenames with account numbers in the name itself... (3 Replies)
Hi,
Can someone please help me with a Command to Search a FILE for a STRING in multiple DIRECTORIES.
I am searching for the VIP in HTTPD.CONF in multiple httpd instances.
I am using
find ./ -name "httpd.conf" | xargs grep 10.22.0.141 cut -d: -f3- | cut -d ' ' -f4 | sort | uniq -c
... (1 Reply)
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Discussion started by: Circuits
3 Replies
LEARN ABOUT ULTRIX
zgrep
ZGREP(1) General Commands Manual ZGREP(1)NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the
standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)ZGREP(1)