Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dir(4) [hpux man page]

dir(4)							     Kernel Interfaces Manual							    dir(4)

dir - format of directories on short-name HFS file systems SYNOPSIS
Remarks This entry describes the System V-compatible directory format for the HFS file system. It is provided strictly for backward compatibility and compatibility with applications expecting a System V file system environment. It is not compatible with the similar but more general HFS directory format in which describes a format identical to that used in an HFS file system supporting long file names up to 255 bytes in length. The structure defined in should be used in conjunction with the directory(3C) routines for portability to other industry UNIX implementa- tions. DESCRIPTION
A directory behaves exactly like an ordinary file, except that no user can write into a directory. The structure of a directory entry as given in the header file is: By convention, the first two entries in each directory are for and (``dot'' and ``dot dot''). The first is an entry for the directory itself. The second is for the parent directory. The meaning of is modified for the root directory of the master file system; there is no parent, so and have the same meaning. AUTHOR
was developed by AT&T and HP. SEE ALSO
directory(3C). dir(4)

Check Out this Related Man Page

mvdir(1M)																 mvdir(1M)

mvdir - move a directory SYNOPSIS
dir newdir DESCRIPTION
moves one directory tree into another existing directory (within the same file system), or renames a directory without moving it. dir must be an existing directory. If newdir does not exist but the directory that would contain it does, dir is moved and/or renamed to newdir. Otherwise, newdir must be an existing directory not already containing an entry with the same name as the last pathname component of dir. In this case, dir is moved and becomes a subdirectory of newdir. The last pathname component of dir is used as the name for the moved directory. refuses to move dir if the path specified by newdir would be a descendent directory of the path specified by dir. Such cases are not allowed because cyclic sub-trees would be created as in the case, for example, of which is prohibited. does not allow directory to be moved. Only users who have appropriate privileges can use EXTERNAL INFLUENCES
International Code Set Support Single- and multi-byte character code sets are supported. AUTHOR
was developed by OSF and HP. SEE ALSO
cp(1), mkdir(1), mv(1). STANDARDS CONFORMANCE
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing characters in a directory structure

I have a directory structure that contains "()". I need to recursivly replace the "(" with an "_" and remove the ")". Can I write a script to: Read -R C:\VCE If "(" exitsts replace with "_" elseif ")" exists, delete. (4 Replies)
Discussion started by: tmettie
4 Replies

2. UNIX for Dummies Questions & Answers

Add Date format to a file.

Hi, I need to copy a file from one directory to another and need to add the current date at the end of my file in the new dir. Please provide me the cmd that I can use. I have a file abc.dat in dir SD/Files. I need to copy this file to dir SD/Files/Latest and the file name should have date... (3 Replies)
Discussion started by: sarath_kalari
3 Replies

3. AIX

size of directory with ls -l

hello When i do a "ls -l" in a directory (Aix 5.3), i have the result : >ls -l total 65635864 -rw-r--r-- 1 lobi system 2559909888 Feb 20 15:06 cible5.7bdat -rw-r--r-- 1 lobi system 1020098870 Feb 20 13:06 cible6.7bdat -rw-r--r-- 1 lobi system 1544789511 Feb 20 11:06 cible9.7bdat -rw-r--r--... (2 Replies)
Discussion started by: pascalbout
2 Replies

4. UNIX for Dummies Questions & Answers

Not quite related to Unix but CP/M file structure...

I'm not sure where to post this but I'm having some trouble with the directories in CP/M... I'm sorry about the length but I'm totally confused... I've seen that the directory entry in CP/M contains the following: 1 byte User Code 8 bytes Filename 3 bytes File extension 1 byte Extension 2... (3 Replies)
Discussion started by: Legend986
3 Replies

5. HP-UX

Getting the index of the last entry in a directory

Hello, Is there anyway of getting the index of the last entry in a directory? I'm using a C program to read the entries, but I want to go to the last entry because the directory is very big and I don't want to read all. I was using the size of the directory file descriptor but when I remove... (4 Replies)
Discussion started by: psimoes79
4 Replies

6. 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

7. Shell Programming and Scripting

How to look for the last file and rename it (sequencially, increment by one)

I need to Ftp a file to a UNIX directory from a windows directory, the file needs to be put sequencially in the UNIX directory , for example: I get the file from the windows directory with the following name. EFT###.DAT, the script needs to look in the UNIX directory and if there are files, for... (5 Replies)
Discussion started by: rechever
5 Replies

8. UNIX for Dummies Questions & Answers

hidden files

I usually use ls -al | awk '{sum = sum + $5} END {print sum}' to sum the size of all files in a directory. However this command includes the hidden files. Is there a command to just add up all the files/sub-directories excluding the hidden files (begins with . and ..) I wanted to check the... (10 Replies)
Discussion started by: lhareigh890
10 Replies

9. Shell Programming and Scripting

last modified directory

hi everyone suppose i have many directory under one directory. now i want to find out the last modified directory so i executed the command ls -ltr but it gives me the directory structure too and i don't want this so i removed 'r' also but it too gives me directory... (2 Replies)
Discussion started by: aishsimplesweet
2 Replies

10. UNIX for Dummies Questions & Answers

cd to parent directory

Is there anyway i can cd to the parent directory of my current directory without using .. entries? (6 Replies)
Discussion started by: linux17
6 Replies

11. Programming

How can I send data to my C converter?

Hello, I have a directory structure of seismic files that are stored within about 1000 different directories. The directory structure is typically no more than two levels deep, and they are organized by station name and disc name. Each disc name folder contains a text file called 'vdaq.txt' that I... (4 Replies)
Discussion started by: ws6transam
4 Replies

12. Emergency UNIX and Linux Support

Command to calculate space for all subdirs under a dir

du -hs command calculates the space for all the subdirs under a dir ...but it is very slow if the dir is there any quick way ...I am using Sun OS. Thanks, Ajay (19 Replies)
Discussion started by: ajaypatil_am
19 Replies

13. UNIX for Dummies Questions & Answers

Finding latest dir based on it's name (yyyymmdd)

Hi Folks, As part of my application I need to find out what the latest directory based on the name of that directory (not it's file system timestamp). Example: I have a directory which contains below directories (each of while contains files etc) 20120000/ 20120000/ latest (symbolic link to... (5 Replies)
Discussion started by: DOWD_R
5 Replies

14. Shell Programming and Scripting

Copying files from parent directory only

Hello, Please can someone assist on a issue I am having. I want to find specific files in the parent directory only that have been modified over the last 2 days and copy them to another location. NOTE: The version of AIX I am using does not have MAXDEPTH. I have currently written the... (3 Replies)
Discussion started by: Dolph
3 Replies

15. UNIX for Dummies Questions & Answers

&& meaning in UNIX

(6 Replies)
Discussion started by: Archana Batta
6 Replies