Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Number of items in a directory Post 302269991 by pludi on Friday 19th of December 2008 09:26:26 AM
Old 12-19-2008
Assuming that your fonts have the extension .ttf
Code:
find . -type f -name '*.ttf' -print | wc -l

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Number of files in a particular directory

Hi, I am new to unix shell scripting.I am using Korn shell. I need to find if there are any files in a particular directory.first I need to find the number of files in the directory.If the file count is greater than 0 then I have to print the file names in a textfile and send an email to the... (5 Replies)
Discussion started by: dbplatha
5 Replies

2. UNIX for Dummies Questions & Answers

Number of files in a directory

I have a directory which has lots of directories and files in it. I want to determine the total number of files in the top level directory (inclduing the files in sub-dirs) Is there a unix command of that ?/ Thanks !!! (3 Replies)
Discussion started by: tantric
3 Replies

3. Shell Programming and Scripting

awk between items including items

OS=HP-UX ksh The following works, except I want to include the <start> and <end> in the output. awk -F '<start>' 'BEGIN{RS="<end>"; OFS="\n"; ORS=""} {print $2} somefile.log' The following work in bash but not in ksh sed -n '/^<start>/,/^<end>/{/LABEL$/!p}' somefile.log (4 Replies)
Discussion started by: Ikon
4 Replies

4. Shell Programming and Scripting

Store number in a directory

hi all, this is some code in c...i want to write script for this... for(i=0;i<10;i++) { store i in backup directory; } (1 Reply)
Discussion started by: AbhijitIT
1 Replies

5. Shell Programming and Scripting

Number of files per directory

Hi Guys, I am trying to display the total number of files within a directory (including sub dirs): i.e. solaris> du -sh * | sort +0rn 1009K cron 940K lib 849K svc 489K cacao 261K opt 212K preserve 167K dt But instead of the size I would like the number of files... (9 Replies)
Discussion started by: flexinfo
9 Replies

6. Shell Programming and Scripting

Delete a directory after X number of days

Hi How do I remove a directory which are some days old . For Ex : $ cd /WMID/data/temp/TxTest/Dev/txStore $ ls -ltr total 0 drwxr-xr-x 3 wmethods wmapp 80 Jul 21 03:36 0AE445C4 drwxr-xr-x 3 wmethods wmapp 80 Jul 21 04:00 0AE44664 drwxr-xr-x 3 wmethods... (6 Replies)
Discussion started by: leo76
6 Replies

7. Shell Programming and Scripting

Counting the number of readable, writable, and executable items in a directory

Hello, I'm writing a script in sh in which the first command line argument is a directory. from that, i'm suppose to count the number of readable, writable, and executable items in the directory. I know using $1 represents the directory, and ls would display all the items in the directory, and that... (4 Replies)
Discussion started by: kratos22
4 Replies

8. Shell Programming and Scripting

How to count number of files in directory and write to new file with number of files and their name?

Hi! I just want to count number of files in a directory, and write to new text file, with number of files and their name output should look like this,, assume that below one is a new file created by script Number of files in directory = 25 1. a.txt 2. abc.txt 3. asd.dat... (20 Replies)
Discussion started by: Akshay Hegde
20 Replies

9. What is on Your Mind?

Number of Small Forum Code Changes (TODO List Items)

In the past few days have I have done a lot of code cleanup work in various categories, including faster page loading and bug fixes: Move countless inline style directives to external CSS stylesheets for key pages (faster page loading) Fixed bug in member panel going between desktop and... (6 Replies)
Discussion started by: Neo
6 Replies
TTX(1)							    BSD General Commands Manual 						    TTX(1)

NAME
ttx -- tool for manipulating TrueType and OpenType fonts SYNOPSIS
ttx [option ...] file ... DESCRIPTION
ttx is a tool for manipulating TrueType and OpenType fonts. It can convert TrueType and OpenType fonts to and from an XML-based format called TTX. TTX files have a '.ttx' extension. For each file argument it is given, ttx detects whether it is a '.ttf', '.otf' or '.ttx' file and acts accordingly: if it is a '.ttf' or '.otf' file, it generates a '.ttx' file; if it is a '.ttx' file, it generates a '.ttf' or '.otf' file. By default, every output file is created in the same directory as the corresponding input file and with the same name except for the exten- sion, which is substituted appropriately. ttx never overwrites existing files; if neccesary, it appends a suffix to the output file name before the extension, as in Arial#1.ttf. General options -h Display usage information. -d dir Write the output files to directory dir instead of writing every output file to the same directory as the corresponding input file. -v Be verbose. Write more messages to the standard output describing what is being done. -a Allow virtual glyphs ID's on compile or decompile. Dump options The following options control the process of dumping font files (TrueType or OpenType) to TTX files. -l List table information. Instead of dumping the font to a TTX file, display minimal information about each table. -t table Dump table table. This option may be given multiple times to dump several tables at once. When not specified, all tables are dumped. -x table Exclude table table from the list of tables to dump. This option may be given multiple times to exclude several tables from the dump. The -t and -x options are mutually exclusive. -s Split tables. Dump each table to a separate TTX file and write (under the name that would have been used for the output file if the -s option had not been given) one small TTX file containing references to the individual table dump files. This file can be used as input to ttx as long as the referenced files can be found in the same directory. -i Don't disassemble TrueType instructions. When this option is specified, all TrueType programs (glyph programs, the font program and the pre-program) are written to the TTX file as hexadecimal data instead of assembly. This saves some time and results in smaller TTX files. -y n When decompiling a TrueType Collection (TTC) file, decompile font number n, starting from 0. Compilation options The following options control the process of compiling TTX files into font files (TrueType or OpenType): -m fontfile Merge the input TTX file file with fontfile. No more than one file argument can be specified when this option is used. -b Don't recalculate glyph bounding boxes. Use the values in the TTX file as is. THE TTX FILE FORMAT
You can find some information about the TTX file format in documentation.html. In particular, you will find in that file the list of tables understood by ttx and the relations between TrueType GlyphIDs and the glyph names used in TTX files. EXAMPLES
In the following examples, all files are read from and written to the current directory. Additionally, the name given for the output file assumes in every case that it did not exist before ttx was invoked. Dump the TrueType font contained in FreeSans.ttf to FreeSans.ttx: ttx FreeSans.ttf Compile MyFont.ttx into a TrueType or OpenType font file: ttx MyFont.ttx List the tables in FreeSans.ttf along with some information: ttx -l FreeSans.ttf Dump the 'cmap' table from FreeSans.ttf to FreeSans.ttx: ttx -t cmap FreeSans.ttf NOTES
On MS-Windows and MacOS, ttx is available as a graphical application to which files can be dropped. SEE ALSO
documentation.html fontforge(1), ftinfo(1), gfontview(1), xmbdfed(1), Font::TTF(3pm) AUTHORS
ttx was written by Just van Rossum <just@letterror.com>. This manual page was written by Florent Rougon <f.rougon@free.fr> for the Debian GNU/Linux system based on the existing FontTools documenta- tion. It may be freely used, modified and distributed without restrictions. May 18, 2004
All times are GMT -4. The time now is 01:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy