Hello all! I am writing a script that takes in a directory name as input and if the directory exists, it shows the files inside the directory
here is what I have so far (incomplete) (mostly like pseudocode)
disregard the xxxxx, that is personal information I have erased. What I want it to do is use grep to search the current directory for any "sub directories" and see if they exist. If they do exist then run the cd command to jump to that directory and ls to show the contents. I am having trouble incorporating it into the script. Any help is appreciated. . thank you
I just moved my mail server (qmail in maildir format) from a solaris box to a RedHat linux box. When I select some inboxes in pine, I get a directory listing of the inbox, its not automatically opening the qmail cur directory.
This doesn't happen with all, and it doesn't happen at all on... (0 Replies)
Hey guys!
I'm so glad I found this site, I've had so many questions and have been left alone for roughly a year scanning man pages but It's just not quite cutting it for some things.
So, I often like to list directories when browsing around my local machine, a friend's machine, or my web... (6 Replies)
Hi Guys,
I have an user's home directory set to /home/A
And A contains the following directories B & C
Is there some way in solaris by which i can prevent the directories B and C from getting deleted by the user but the contents of the directories B & C can be deleted ?
Also i have... (2 Replies)
This should be an easy question for you gurus. :)
How can I create a regular expression to match all files in the current directory that have only one period in their file name, and also not contain the string "abc" before the period?
It would match:
foo.txt
foobar.log
It would not... (4 Replies)
Hi ,
I am trying to make a cron job to delete the contents of a directory in a linux environment.The contents created before 2 days should get deleted by this job.Here is what i have written :
/usr/bin/find / -name *.log -ctime +2 -exec /bin/rm -f {} \;
Is it correct....If not so,please... (9 Replies)
strange :)
can you tell why?:cool:
#!/bin/bash
echo " enter your age "
read age
if ; then
echo " you do not have to pay tax "
elif ]; then
echo " you are eligible for income tax "
else
echo " you dont have to pay tax "
fi (3 Replies)
Hi all
This is my first post. Please bear with me with all my mistakes. I started learning shell since couple of days now and this might be quite basic for all, i want to search for files in a directory containing specific string and replace it with new string. The code i wrote is quite bulky... (2 Replies)
Hello there,
I'm using a read-while loop to preserve the word Failed within a text file. For example, if the word Failed exist twice in a single text file, my STDOUT should re-direct to a new text file and display Failed twice.
My output is attached to this thread. I would like output to... (4 Replies)
Discussion started by: SysAdminRialto
4 Replies
LEARN ABOUT HPUX
dir
dir(4) Kernel Interfaces Manual dir(4)NAME
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)