10-13-2012
how to get all files on a directory of .c file
i need to get all files names on a c file directory to I can open every file and read from them to write on other files......
I solved the problem of reading and writing for a specific file to another file ....
but i want that for text files in .c file directory so how to read a names of files 1 by 1
I searched a lot but no codes about that
10 More Discussions You Might Find Interesting
1. Solaris
I have created a file that has list of all the files I want to copy into another directory.Is there a way to do it?
Thanks In advance (4 Replies)
Discussion started by: shreethik
4 Replies
2. Shell Programming and Scripting
Hi All,
I need to create a file which contains the list of all the files present in that directory.
e.g.,
ls /export/home/user/*.dat > list_file.dat
but what i am getting is:
$ ls /export/home/user/*.dat > list_file.dat
/export/home/user/*.dat: No such file or directory
But I have... (1 Reply)
Discussion started by: pranavagarwal
1 Replies
3. UNIX for Dummies Questions & Answers
hello there
i want to creat a file that count how many files i have in the directory.
for this i use the command
find . -type f | wc -l > 1In1.myfile
the problem with this command is that it not update after i add a new file in the directory.
Anyone got any ideas how i can... (5 Replies)
Discussion started by: AntiPin
5 Replies
4. Shell Programming and Scripting
Hi,
I am trying to get the total file size for certain files per directory.
I am using
find /DirectoryPath -name '*.dta' -exec ls -l {} \; | awk '{ print $NF ": " $5 }' > /users/cergun/My\ Documents/dtafiles.txt
but this lists all the files in the directories.
I need the total... (9 Replies)
Discussion started by: cergun
9 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I need to copy files from one dir to another dir.
The list of filesnames to be moved are in a file called files2cp.log
Script:
#!/bin/ksh
exec 0</home/amdocs/files2cp.log
while read LINE
do
cp -i /iccs33/attach/"$LINE" /iccs30/attach/"$LINE"
done
The output is "No such... (6 Replies)
Discussion started by: srinirsr
6 Replies
6. Shell Programming and Scripting
Script must removes files from the first directory if there is a file with same name in the second directory
Script passed to the two directories, it lies with them in one directory:
sh script_name dir1 dir2
This is my version, but it does not work :wall:
set - $2/*
for i
do
set -... (6 Replies)
Discussion started by: SLAMUL
6 Replies
7. Shell Programming and Scripting
got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies
8. Shell Programming and Scripting
I have two files
File 1 in reading directory is of following format
Read 1 A T
Read 3 T C
Read 5 G T
Read 7 A G
Read 10 A G
Read 12 C G
File 2 in directory contains
Read 5 A G
Read 6 T C
Read 7 G A
Read 8 G A
Read 20 A T
File2 contains (1 Reply)
Discussion started by: empyrean
1 Replies
9. Shell Programming and Scripting
I have a log file with contents like below.
Repository: https://someserver:9443/
Workspace: (1000) "test_scripts_ws"
Component: (1001) "some_Automated_Scripts"
Change sets:
(1002) ---$ john "test memory" 17-Sep-2014 02:24 PM
Changes:
--a--... (9 Replies)
Discussion started by: gaurav99
9 Replies
10. Shell Programming and Scripting
Given a directory containing say a few thousand files,
please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents.
func(a_directory_name) output -> {“matches”: , ... ]}
e.g. func(“/home/my/files”) where the directory... (7 Replies)
Discussion started by: anuragpgtgerman
7 Replies
LEARN ABOUT SUSE
mkfontscale
MKFONTSCALE(1) General Commands Manual MKFONTSCALE(1)
NAME
mkfontscale - create an index of scalable font files for X
SYNOPSIS
mkfontscale [ -b ] [ -s ] [ -o filename ] [ -x suffix ] [ -a encoding ] ... [ -f fuzz ] [ -l ] [ -e directory ] [ -p prefix ] [ -r prefix ]
[ -n prefix ] [ -- ] [ directory ] ...
DESCRIPTION
For each directory argument, mkfontscale reads all of the scalable font files in the directory. For every font file found, an X11 font
name (XLFD) is generated, and is written together with the file name to a file fonts.scale in the directory.
The resulting fonts.scale file should be checked and possibly manually edited before being used as input for the mkfontdir(1) program.
OPTIONS
-b read bitmap fonts. By default, bitmap fonts are ignored.
-s ignore scalable fonts. By default, scalable fonts are read. If -b is set, this flag has the side effect of enabling the reading of
fonts.scale files.
-o filename
send program output to filename; default is fonts.scale if bitmap fonts are not being read, and fonts.dir if they are. If filename
is relative, it is created in the directory being processed. If it is the special value -, output is written to standard output.
-x suffix
exclude all files with the specified suffix.
-a encoding
add encoding to the list of encodings searched for.
-f fuzz
set the fraction of characters that may be missing in large encodings to fuzz percent. Defaults to 2%.
-l Write fonts.dir files suitable for implementations that cannot reencode legacy fonts (BDF and PCF). By default, it is assumed that
the implementation can reencode Unicode-encoded legacy fonts.
-e specifies a directory with encoding files. Every such directory is scanned for encoding files, the list of which is then written to
an "encodings.dir" file in every font directory.
-p Specifies a prefix that is prepended to the encoding file path names when they are written to the "encodings.dir" file. The prefix
is prepended literally: if a `/' is required between the prefix and the path names, it must be supplied explicitly as part of the
prefix.
-r Keep non-absolute encoding directories in their relative form when writing the "encodings.dir" file. The default is to convert rel-
ative encoding directories to absolute directories by prepending the current directory. The positioning of this options is signifi-
cant, as this option only applies to subsequent -e options.
-n do not scan for fonts, do not write font directory files. This option is useful when generating encoding directories only.
-- end of options.
SEE ALSO
X(7), Xserver(1), mkfontdir(1), ttmkfdir(1), xfs(1), xset(1)
NOTES
The format of the fonts.scale, fonts.dir and encodings.dir files is documented in the mkfontdir(1) manual page.
Mkfontscale will overwrite any fonts.scale file even if it has been hand-edited.
mkfontscale -b -s -l is equivalent to mkfontdir.
AUTHOR
The version of mkfontscale included in this X.Org Foundation release was originally written by Juliusz Chroboczek <jch@freedesktop.org> for
the XFree86 project. The functionality of this program was inspired by the ttmkfdir utility by Joerg Pommnitz.
X Version 11 mkfontscale 1.0.7 MKFONTSCALE(1)