Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to Differentiate Between Files and Folders? Post 302072085 by dgower2 on Thursday 27th of April 2006 09:32:05 AM
Old 04-27-2006
If it's 96 bytes, it's a directory?

I think I just figured it out. Anything that's a directory seems to be 96 bytes. Does this sound like a reliable method?

Thanks,

Dan
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

removing old files except configuration files and folders

Dear all, I want to remove files older than 2 months in the /home/member directory. But except the configuration files (like .bash_profile .config/ .openoffice/ .local/ .kde/ etc..) I have tried with the command find . -mtime +60 -wholename './.*' -prune -o -print -exec mv {} \; but it... (1 Reply)
Discussion started by: jamcalicut
1 Replies

2. HP-UX

to get the timestamp of files from the files and folders in Unix

Hi, I had a directory and many subdirectories and files with in it. Now i want to get the timestamp of files from the files and folders recursively. :( Please help me to generate a script fort he above mentioned requirement! Appreciate for ur qick response Thanks in advance! ... (2 Replies)
Discussion started by: kishan
2 Replies

3. Shell Programming and Scripting

How to differentiate two tar files

Hi All, I am new to this unix stuff.I just have one doubt:suppose i have two tar files and sometimes it happens that when we just check these files from outside these two tar files look same "Eg: ls -lrt drw-r--r-- 1 oasis logadmin 37067 Apr 3 05:48 file1.tar drw-r--r-- 1 oasis ... (7 Replies)
Discussion started by: siri_14
7 Replies

4. UNIX and Linux Applications

Differentiate between MS Word and Excel files in Unix

Hi, I want to differentiate between a MS Word and Excel file in Unix (not by extension). The condition which we are currently checking for is the pattern "\320\317\021\340" within first 40 bytes of the file. However this format is same in all MS Office files. Can somebody tell me any special... (4 Replies)
Discussion started by: phatak_rajan
4 Replies

5. Shell Programming and Scripting

Compare 2 folders to find several missing files among huge amounts of files.

Hi, all: I've got two folders, say, "folder1" and "folder2". Under each, there are thousands of files. It's quite obvious that there are some files missing in each. I just would like to find them. I believe this can be done by "diff" command. However, if I change the above question a... (1 Reply)
Discussion started by: jiapei100
1 Replies

6. UNIX for Dummies Questions & Answers

Searching for folders/parent folders not files.

Hello again, A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x. I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies

7. Shell Programming and Scripting

List all the files in the present path and Folders and subfolders files also

Hi, I need a script/command to list out all the files in current path and also the files in folder and subfolders. Ex: My files are like below $ ls -lrt total 8 -rw-r--r-- 1 abc users 419 May 25 10:27 abcd.xml drwxr-xr-x 3 abc users 4096 May 25 10:28 TEST $ Under TEST, there are... (2 Replies)
Discussion started by: divya bandipotu
2 Replies

8. Shell Programming and Scripting

Compare and Differentiate Multiple Files

Im using code below comparing and getting the diff of two files. But what about multiple files? can you help me guys diff -u file1 file2|sed -n '/^---/!{/^-/s/-//p}' diff -ui file1 file2| sed -n '/^++/!{/^+/s/+//p}' Example File1: aaa bbb ccc ddd File2: bbb eee (5 Replies)
Discussion started by: kenshinhimura
5 Replies

9. Shell Programming and Scripting

Differentiate 2 files name

Hello All, I have 2 Type of files. 1. MYTEST001_RKP_DORALDO_20150402120000.zip 2. CMP001_STD001_MOGANO_RPSL_20150409_C.zip I can receive these Two type of file at one location. If i receive second type of file CMP001_STD001_MOGANO_RPSL_20150409_C.zip I have to process without... (9 Replies)
Discussion started by: yadavricky
9 Replies

10. Shell Programming and Scripting

How to copy files/folders and show the files/folders?

Hi, So i know we use cp -r as a basic to copy folders/files. I would like this BUT i would like to show the output of the files being copied. With the amazing knowledge i have i have gone as far as this: 1) find source/* -exec cp -r {} target/ \; 2) for ObjectToBeCopied in `find... (6 Replies)
Discussion started by: Imre
6 Replies
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. Symlinks 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.11 18 Mar 2004 cachefspack(1M)
All times are GMT -4. The time now is 09:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy