Attach filename to wc results on massive number of files
Hello,
I have massive number of big files that needed to be counted for the total number of lines (> 100x millions) each. I want the file name attached to the count results so that they are aligned nicely matching name and counts.
I could do each file at a time, which will take hours to finish, so that the jobs were sent to background as I have multiple cores available to get the job done quickly. The problem with my script is the "echo -n $f" "; always accomplishes first, and the ${f}_R1.fq.gz | wc -l part is behind too much and the result was not aligned as expected.
Here is my code:
How should I improve my script to get what is expected? Thanks a lot!
I am searching some rather large text files using grep and or awk.
What I would like to know is if there is a way (either with grep, awk, or realy any other unix tool) to stop the search when a predifined number of results are returned.
I would like to do this for speed purpuses. When i get... (6 Replies)
Hello All,
I am maintaining a server and I use pine as MUA and sendmail as MTA. Suddenly many users in the network face the problem of not being able to attach files using pine. I checked the sendmail.cf file and found a variable "MaxMessageSize = 1000000". Eventhough the message size... (2 Replies)
if test.dat is the file
cat test.dat|uuencode test.dat|mailx -s "subject" mailid
can be used for attaching test.dat
how can i attach more than one file to a mail using mailx (2 Replies)
Hi all,
I have a list of xml file. I need to split the files to a different files when see the <ko> tag.
The list of filename are
B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml
B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml
B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml
... (3 Replies)
Hi,
My script has to send 2 files as a separate attachment(Note : files to be sent without zipping) to the specified email id.
Below code was used but it is not attaching the file as expected instead the file contents are displayed in the body of the email.
Kindly,help with your... (22 Replies)
Hi, I have 7 terabytes of tar files, one for every single day since 1980. Inside these tar files are GRIB files, each with 100+ variables. There's 8 GRIBs in each tar, corresponding to different times of the day. I need 6 friggin variables..., and it takes TWO WEEKS TO EXTRACT ALL THE TAR FILES... (3 Replies)
I am trying to display the output of ls and also print the number of characters in EVERY file name. This is what I have so far:
#!/bin/sh
for x in `ls`; do
echo The number of characters in x | wc -m
done
Any help appreciated (1 Reply)
Hi guys,
I'm struggling with this one, any help is appreciated.
I have File1 with hundreds of unique words, like this:
word1
word2
word3
I want to count each word from file1 in file2 and return how many times each word is found.
I tried something like this:
for i in $(cat file1); do... (13 Replies)
Hi all,
I have 20 files (file001.txt upto file020.txt) and I want to read them from 3rd line upto end of file (line 1002). But in the final file they should appear to start from line 1.
I need following kind of output in a single file:
Filename Line number 2ndcolumn 4thcolumn
I... (14 Replies)
Discussion started by: bioinfo
14 Replies
LEARN ABOUT SUNOS
quot
quot(1M) System Administration Commands quot(1M)NAME
quot - summarize file system ownership
SYNOPSIS
quot [-acfhnv] filesystem...
quot -a [-cfhnv]
DESCRIPTION
quot displays the number of blocks (1024 bytes) in the named filesystem (one or more) currently owned by each user. There is a limit of
2048 blocks. Files larger than this will be counted as a 2048 block file, but the total block count will be correct.
OPTIONS
The following options are supported:
-a Generate a report for all mounted file systems.
-c Display three columns giving a file size in blocks, the number of files of that size, and a cumulative total of blocks containing
files of that size or a smaller size.
-f Display three columns giving, for each user, the number of blocks owned, the count of number of files, and the user name. This
option is incompatible with the -c and -v options.
-h Estimate the number of blocks in the file. This does not account for files with holes in them.
-n Attach names to the list of files read from standard input. quot -n cannot be used alone, because it expects data from standard
input. For example, the pipeline
ncheck myfilesystem | sort +0n | quot -n myfilesystem
will produce a list of all files and their owners. This option is incompatible with all other options.
-v In addition to the default output, display three columns containing the number of blocks not accessed in the last 30, 60, and 90
days.
OPERANDS
filesystem mount-point of the filesystem(s) being checked
USAGE
See largefile(5) for the description of the behavior of quot when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes).
EXIT STATUS
0 Successful operation.
32 Error condition (bad or missing argument, bad path, or other error).
FILES
/etc/mnttab Lists mounted file systems.
/etc/passwd Used to obtain user names
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO du(1), mnttab(4), passwd(4), attributes(5), largefile(5)NOTES
This command can only be used by the super-user.
SunOS 5.10 30 May 2001 quot(1M)