I have a folder structure like the below
/test/test1/test2/app
/test/test3/app
/test/test4/test5/app
..
I need to create a new folder under "app" in all the above listed directory structure at one shot by the name "subapp" .
How can we acheive this using a script .
New to unix... (4 Replies)
Hi ,
I am very new to unix as well as shell scripting. I have to write a script for the following requirement.
In a particular mount, have to list all the directories and sub directories along with size of the directory and sub directory in ascending order.
Please help me in this regard and many... (4 Replies)
Hi,
Please help me, how to get all the direcotries, its sub directories and its sub directories recursively, need to exclude all the files in the process.
I wanted to disply using a unix command all the directories recursively excluding files.
I tried 'ls -FR' but that display files as... (3 Replies)
It is for HP-Unix B.11.31.
Requirement:
1. List the directories, which directories name has given particular string.
Example: Directories with name "Build"
2. On the output of 1. list the directories by creation date as sort order.
I tried with; find . -type d -name "Build*"
... (3 Replies)
Hi all,
Using grep command, i want to find the pattern of text in all directories and sub-directories.
e.g: if i want to search for a pattern named "parmeter", i used the command
grep -i "param" ../*
is this correct? (1 Reply)
I am trying to link 2 directories using:
ln -s /net/<hostname>/srcdir/ /net/<desthostname>/dstdir/
I get the following error:
ln: /net/<desthostname>/dstdir: Function is not available
What is it that i am trying to do wrongly in the above operation?
Please use next time code tags (3 Replies)
I have a top-level directory called work and I would like to create subdirectories work1 work2... under this directory. Also I would like to create subdirectory under work1 -- test, work2 -- test etc., Can I automate this using a command-line script?
work
|_work 1
|_test
|_work 2
... (2 Replies)
Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance. (7 Replies)
i am having trouble creating a directory with last months date as the folder name.
what i am using is echo `date +%b%y`
which gives
Mar14 as the result but i want to get Feb14 as the result.:wall: (6 Replies)
What I know so far:
ls -A will list all files except those starting with a dot
ls -d will list all directories
ls -m will separate contents by commas
For getting crtimes use:
stat filename will give me the inode number
or
ls -i filename will give... (13 Replies)
Discussion started by: chstewar
13 Replies
LEARN ABOUT SUNOS
sortm
SORTM(1) [nmh-1.5] SORTM(1)NAME
sortm - sort messages
SYNOPSIS
sortm [+folder] [msgs] [-datefield field] [-textfield field] [-notextfield] [-limit days] [-nolimit] [-verbose | -noverbose] [-version]
[-help]
DESCRIPTION
Sortm sorts the specified messages in the named folder according to the chronological order of the "Date:" field of each message.
The -verbose switch directs sortm to tell the user the general actions that it is taking to place the folder in sorted order.
The -datefield field switch tells sortm the name of the field to use when making the date comparison. If the user has a special field in
each message, such as "BB-Posted:" or "Delivery-Date:", then the -datefield switch can be used to direct sortm which field to examine.
The -textfield field switch causes sortm to sort messages by the specified text field. If this field is "subject", any leading "re:" is
stripped off. In any case, all characters except letters and numbers are stripped and the resulting strings are sorted datefield-major,
textfield-minor, using a case insensitive comparison.
With -textfield field, if -limit days is specified, messages with similar textfields that are dated within `days' of each other appear
together. Specifying -nolimit makes the limit infinity. With -limit 0, the sort is instead made textfield-major, date-minor.
For example, to order a folder by date-major, subject-minor, use:
sortm -textfield subject +folder
FILES
$HOME/.mh_profile The user profile
PROFILE COMPONENTS
Path: To determine the user's nmh directory
Current-Folder: To find the default current folder
SEE ALSO folder(1)DEFAULTS
`+folder' defaults to the current folder
`msgs"'defaultstoall"
`-datefield' defaults to date
`-notextfield'
`-noverbose'
`-nolimit'
CONTEXT
If a folder is given, it will become the current folder. If the current message is moved, sortm
will preserve its status as current.
HISTORY
Timezones used to be ignored when comparing dates: they aren't any more.
Messages which were in the folder, but not specified by `msgs', used to be moved to the end of the folder; now such messages are left
untouched.
Sortm sometimes did not preserve the message numbering in a folder (e.g., messages 1, 3, and 5, might have been renumbered to 1, 2, 3 after
sorting). This was a bug, and has been fixed. To compress the message numbering in a folder, use "folder -pack" as always.
BUGS
If sortm encounters a message without a date-field, or if the message has a date-field that sortm cannot parse, then sortm attempts to keep
the message in the same relative position. This does not always work. For instance, if the first message encountered lacks a date which
can be parsed, then it will usually be placed at the end of the messages being sorted.
When sortm complains about a message which it can't temporally order, it complains about the message number prior to sorting. It should
indicate what the message number will be after sorting.
MH.6.8 11 June 2012 SORTM(1)