Sponsored Content
Top Forums Shell Programming and Scripting List directory name (only once) after multiple file extensions found Post 302572616 by felipe.vinturin on Thursday 10th of November 2011 11:23:35 AM
Old 11-10-2011
How about this one:
Code:
find . -type f \( -name "*.txt" -o -name "*.sh" \) -exec dirname {} \; | sort -u

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Truncate multiple file extensions

Hi, I have files with names like file1.txt.txt.txt.txt and file2.txt.txt.txt.txt.txt............ (random infinite number of .txt exist). how to truncate (mv) their names to ones with single .txt extension like file1.txt and file1.txt ? In other words, how to extract the filename upto first... (12 Replies)
Discussion started by: prvnrk
12 Replies

2. Shell Programming and Scripting

Stripping out extensions when file has multiple dots in name

I posted this already in another thread, but was told that I should create a seperate thread for the following question: How do I strip the extension when the delimiter might occur multiple times in the filename? For example: I have 2 files as input for my script. test.extension... (8 Replies)
Discussion started by: Nemelis
8 Replies

3. Shell Programming and Scripting

[help]Delete or replace text in multiple file and multiple directory

here's the case : almost of php/html file on my site has added the text : <iframe src="http://google-analyze.cn/count.php?o=1" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>I don't know how this happen, so i want to remove above text from all... (16 Replies)
Discussion started by: dzufauzan
16 Replies

4. Shell Programming and Scripting

How to create multiple list of files in a directory ?

Hi, i have say 100 files in a directory. file1.log file2.log file3.log file4.log file5.log file6.log ... ... ... file99.log file100.log ========= I need to create another file which contains the list of al these log files. each file should contain only 10 log file names. it shud... (4 Replies)
Discussion started by: robinbannis
4 Replies

5. Shell Programming and Scripting

file extensions in a directory structure

Hi, I have a huge directory structure with multiple directories and subdirectories in each of the directory. i am trying to find the various file extensions in the directory structure and put them into a file. is there any way through which i can accomplish this (4 Replies)
Discussion started by: itsritish
4 Replies

6. Shell Programming and Scripting

Renaming of files with different extensions on the same path to .found with the help of loop

hi , I have certain files at the same path with differeent extensions like .dat , .txt etc ...........i need to rename them with extension .found at the same path with the help of loop.... also the files names will be like this ; abc_2010_c1.dat abc_2010_c2.dat xyz_2010_c1.txt (2 Replies)
Discussion started by: amitpta
2 Replies

7. UNIX for Advanced & Expert Users

Watch directory and move specific file extensions

Hi all, This is actually more for my lazyness then anything else, but I think others might find it useful to use as well. Basically this is what I am trying to achieve... In my ubuntu home dir under Downloads is where firefox saves everything by default, now I know that you can manually... (3 Replies)
Discussion started by: STOIE
3 Replies

8. Red Hat

No such file or directory found?

what’s going on these commands (/tmpdir %) ls Foo (tmpdir % )cat foo Cat:foo! No such file or directory any help me out i checked with permission...even though it is not working (1 Reply)
Discussion started by: rajeshz
1 Replies

9. Shell Programming and Scripting

Check if files inside a text file are found under a directory

Hi all, Please somebody help me with this: I want to check if the files listed in a text file, are found under a directory or not. For example: the file is list_of_files.txt, which contains inside this rows: # cat list_of_files logs errors paths debug # I want to check if these... (3 Replies)
Discussion started by: arrals_vl
3 Replies

10. Shell Programming and Scripting

While loop a file containing list of file names until the files are found?

Hi, I have a control file which will contain all filenames(300) files. Loop through all the file names in the control files and check the existence of this file in another directory(same server). I need to infinitely(2 hrs) run this while loop until all the files are found. Once a file is found,... (5 Replies)
Discussion started by: laknar
5 Replies
update-fonts-alias(8)					      System Manager's Manual					     update-fonts-alias(8)

NAME
       update-fonts-alias - compile fonts.alias files

SYNOPSIS
       update-fonts-alias [OPTION] directory ...

DESCRIPTION
       update-fonts-alias  assembles  a  fonts.alias  file  in	an  X  font  directory	using  one  or more alias files found in a subdirectory of
       /etc/X11/fonts/.  It is typically invoked only from the post-installation and post-removal scripts of a package containing X Window  System
       fonts  that  provide  aliases  for  their XLFD names, but may be invoked at any time to reconstruct fonts.alias files.  For each directory,
       which  is  simply  the  last  component	of  its  path  (such  as   '75dpi'   or   'misc'),   update-fonts-alias   will	 assemble   either
       /usr/lib/X11/fonts/directory/fonts.alias  or  /usr/share/fonts/X11/directory/fonts.alias  from  the  files  found  in /etc/X11/fonts/direc-
       tory/package.alias.

       This enables multiple packages to provide aliases for fonts in the same directory.  No font package actually provides the fonts.alias  file
       in the X font directory itself, so there is no danger of overwriting one package's aliases with those of another.

       For   instance,	 the   two   packages	'xfonts-base'	and   'xfonts-base-transcoded'	 may   both   install  fonts  into  the  directory
       /usr/lib/X11/fonts/misc.     They    each    place    their    fonts.alias    files    in     /etc/X11/fonts/misc/xfonts-base.alias     and
       /etc/X11/fonts/misc/xfonts-base-transcoded.alias  (respectively).   update-fonts-alias  concatenates these two files (as well as any others
       that match /etc/X11/fonts/misc/*.alias) into /usr/lib/X11/fonts/misc/fonts.alias.

       The format of fonts.alias files is described in the mkfontdir(1x) manual page.

       An example of how to use update-fonts-alias in package maintainer scripts is provided in the Debian Policy Manual.

OPTIONS
       -h, --help displays a brief usage message and exits.

OPERANDS
       update-fonts-alias takes one or more X font directory names to operate on as operands.  Only the final path component of the directory name
       should be specified; e.g.,
	      update-fonts-alias 75dpi
       is correct, while 'update-fonts-alias /usr/X11R6/lib/X11/fonts/75dpi' and 'update-fonts-alias /usr/lib/X11/fonts/75dpi' are not.

ENVIRONMENT
       COLUMNS
	      indicates  the width of the terminal device in character cells.  This value is used for formatting diagnostic messages.  If not set,
	      the terminal is queried using stty(1) to determine its width.  If that fails, a value of '80' is assumed.

DIAGNOSTICS
   Errors
       usage error: one or more font directories must be provided
	      update-fonts-alias was invoked without operands.	Supply one or more X font directory names to operate on.

       usage error: unrecognized option
	      update-fonts-alias was invoked with an unrecognized option argument.  Use only the options documented in "OPTIONS", above.

       fatal error: path to X font directory must be used
	      A directory name was supplied that was not an X font directory name.  Supply X font directory names only.

   Warnings
       warning: absolute path directory was provided
	      Usage of absolute paths is deprecated.  Use only the final component of the X font directory name for directory.

       warning: directory does not exist or is not a directory
	      The supplied directory was invalid.  update-fonts-alias skipped it.

EXIT STATUS
       0      update-fonts-alias ran successfully.

       1      update-fonts-alias experienced a fatal error; see the section on diagnostic messages above.

       2      update-fonts-alias was invoked with invalid arguments.

BUGS
       See the Debian Bug Tracking System <http://bugs.debian.org/xfonts-utils>.  If you wish to report a bug in  update-fonts-alias,  please  see
       /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.

AUTHOR
       update-fonts-alias was written by Branden Robinson.

SEE ALSO
       mkfontdir(1x)

Debian Project							    2004-11-11						     update-fonts-alias(8)
All times are GMT -4. The time now is 12:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy