05-25-2006
Yes ! It works now . Have sorted those 500+ files by extensions
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I want to select files which have different extensions such as .cpp, .cs, .h
I can select one of them as
find . -name "*.cpp"
but I want to select all of them in one command only. It should be pretty simple but I'm not able to get it. Any help with the command will be greatly appreciated. (1 Reply)
Discussion started by: MobileUser
1 Replies
2. Shell Programming and Scripting
Hi all,
From one directory I need to fetch only files of type *.xls,*.csv,*.txt. I tried the find . -name '*.txt,*.csv,*.xls' -print. But it throws me error. Please do help me on this.
Thanks
Mahalakshmi.A (11 Replies)
Discussion started by: mahalakshmi
11 Replies
3. Shell Programming and Scripting
I am trying to write a Korne Shell Script wherein we have to sort
files according to their extensions(for eg. 1.sh, 5.sh, 9.sh together;
4.csh, 120.csh, 6.csh together and 7.ksh, 2.ksh, 59.ksh together) and
move them to their respective directories viz. sh, csh and ksh...
I think,... (1 Reply)
Discussion started by: marconi
1 Replies
4. Shell Programming and Scripting
Hello !
i have a few files like ...
setup.001
setup.002
setup.003
setup.004
// to
setup.095
and i would like to rename those files to ...
setup.r01
setup.r02
setup.r03
setup.r04
// to
setup.r95 (7 Replies)
Discussion started by: Putazo
7 Replies
5. Shell Programming and Scripting
Here is a simplified example of my problem. Say I have the following 3 sub-directories;
./folder1
A.txt
A.sh
./folder2
B.txt
./folder3
C.txt
C.sh
I would like to list the directory names which contain both '.txt' & '.sh' type extensions. I have came up with the following code;... (8 Replies)
Discussion started by: mmab
8 Replies
6. Shell Programming and Scripting
Hi all, I am trying to make a for loop invoking files with different extensions (*.ugrd and *.vgrd) and I cant just make it work. Cant figure out how to load the files so as to use them in subsequent commands like the ones in this pseudo code. the files are arranged such that in one date for... (8 Replies)
Discussion started by: ida1215
8 Replies
7. UNIX for Dummies Questions & Answers
Linux RHEL 5.4
It is easy to create a tarball when you have files same extension
For eg:
You want to tar all files with the extension .log . This is easy
tar -cvf diagnose.tar *.log
I have two files with different extensions .log and .sh :
error.log
myscript.sh
I want to create a... (5 Replies)
Discussion started by: John K
5 Replies
8. Shell Programming and Scripting
Hi !
I wonder if anyone can help on this : I have a directory: /xyz that has the following files:
chsLog.107.20130603.gz
chsLog.115.20130603
chsLog.111.20130603.gz
chsLog.107.20130603
chsLog.115.20130603.gz
As you ca see there are two files that are the same but only with a minor... (10 Replies)
Discussion started by: fretagi
10 Replies
9. Shell Programming and Scripting
Hi,
i have two folders. Folder A has 1000+ files with just images named like :
01012015.png
01022015.png
etc. Folder B has much more files, part of them with same name as png files folder others not. Instead of folder A wich are only images, these are audio wav files.
I need to... (11 Replies)
Discussion started by: Board27
11 Replies
10. Shell Programming and Scripting
Hello all!
I want to move several files foo.aux foo.log foo.pdf foo.tex to bar_foo.aux bar_foo.pdf bar_foo.tex
I am on tcsh
% mv foo.* bar_!#:1
is not working.
Thank you for your help
marek (11 Replies)
Discussion started by: marek
11 Replies
LEARN ABOUT LINUX
cachefspack
cachefspack(1M) System Administration Commands cachefspack(1M)
NAME
cachefspack - pack files and file systems in the cache
SYNOPSIS
cachefspack [-h] [-i | -p | -u] [-f packing-list] [-U cache-directory] [file...]
DESCRIPTION
The cachefspack utility is used to set up and maintain files in the cache. This utility affords greater control over the cache, ensuring
that the specified files are in the cache whenever possible.
cachefspack does not pack files when the backfileystem type for the cachefs mount is NFSv4. This is because only pass-through support is
available for cachefs with NFSv4.
OPTIONS
The following options are supported:
-f packing-list Specify a file containing a list of files and directories to be packed. Options within subdirectories and files can
also be specified. The format and rules governing packing-list are described on the packingrules(4) manual page.
Directories are packed recursively. Symlinks that match a regular expression on a LIST command are followed. Sym-
links encountered while recursively processing directories are not followed.
-h Help. Print a brief summary of all the options.
-i View information about the packed files.
-p Pack the file or files specified by file. This is the default behavior.
-u Unpack the file or files specified by file.
-U cache-directory Unpack all files in the specified cache directory.
OPERANDS
The following operands are supported:
file A path name of a file to be packed or unpacked.
USAGE
See largefile(5) for the description of the behavior of cachefspack when encountering files greater than or equal to 2 Gbyte ( 2 **31
bytes).
EXAMPLES
Example 1: Packing a File in the Cache
The following example packs the file projects in the cache:
% cachefspack -p projects
Example 2: Packint Files in the Cache
The following example packs the files projects, updates, and master_plan in the cache:
% cachefspack -p projects updates master_plan
Example 3: Unpacking a File From the Cache
The following example unpacks the file projects from the cache:
% cachefspack -u projects
Example 4: Unpacking Files From the Cache
The following example unpacks the files projects, updates, and master_plan from the cache:
% cachefspack -u projects updates master_plan
Example 5: Unpacking All Files From in a Cache Directory
The following example unpacks all files in the cache directory cache1:
% cachefspack -U /cache/cache1
Example 6: Using a Packing List
The following example illustrates the use of a packing list to specify files to be packed in the cache.
The contents of lists.pkg are as follows:
IGNORE SCCS BASE /src/junk LIST *.c LIST *.h
The following command packs all files in the /src/junk directory which have .c and .h extensions, and do contain the string SCCS in the
file's path name:
% cachefspack -f lists.pkg
EXIT STATUS
0 Successful completion.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
cfsadmin(1M), mount_cachefs(1M), packingrules(4), attributes(5), largefile(5)
SunOS 5.10 18 Mar 2004 cachefspack(1M)