07-18-2013
Not just an alias, but a sourced script in your path could also extract the project name for $PWD and add the script dir to the head of the $PATH. You could even build this into your ~/.profile or the like.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How do I pack (using tar zcvf ?) the current folder inluding all files and folders ??
I need to be sure to get all files and folders/subfolders...
Later I will unpack into a new folder on a new server..
Appreciate any help.. (3 Replies)
Discussion started by: WebWatch
3 Replies
2. Shell Programming and Scripting
Alright, I am sure this is a laughable question, but I don't know so I am going to ask anyway.
I have a little script I am writing to take information from one source, recode it in a certain way, and print to files for each subject I have data for. This all works perfectly. I just want to put... (6 Replies)
Discussion started by: ccox85
6 Replies
3. Shell Programming and Scripting
How do I find files in current folder only?
We are on AIX 5.3, so maxdepth is not supported.
I tried to do this
find /dir1/dir2/dir3/dir4 -prune -type f
to display all files in /dir1/dir2/dir3/dir4 only but it does not show any files.
Somehow the -prune option works for dir3 level... (7 Replies)
Discussion started by: Hangman2
7 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Is there a way to zip the content (recursively) of a folder other then the current directory, and keep the directory structure intact?
Example:
/var/tmp/myfolder
----------------- file1
----------------- file2
----------------- folder1
------------------------ file3
Now I want... (3 Replies)
Discussion started by: jimih
3 Replies
5. Shell Programming and Scripting
Hello everyone,
Just registered here, I'm kinda new to Unix :o
I've been trying to automate some processes with various Windows tools. I found that using unix scripts the result would be closest to my needs. So I installed Cygwin on Windows 7.
My folders and files are structured like this:... (7 Replies)
Discussion started by: c_bg1
7 Replies
6. UNIX for Dummies Questions & Answers
Hello,
Neither ‘Grep -r' nor ‘grep -R' is working in my environment. (Searching for a text pattern in the files)
Any suggestions... Using SunOS 5.9
Thanks,
Trinanjan. (1 Reply)
Discussion started by: bhanja_trinanja
1 Replies
7. UNIX for Dummies Questions & Answers
Hello guys,
I am sure this has been asked before, but honestly, I cant find post talking about it.
Here is what I need:
- A tar file will be generated manually by user
- This tar file is then used within a bash shell script
My source folder structure is like this:
... (2 Replies)
Discussion started by: manolain
2 Replies
8. Emergency UNIX and Linux Support
Hi,
I need to find the list of matching direcories in current folder only and no subfolders on AIX.I tried -maxdepth option but its not working.
Also, tried ls -d option to list the matching directories but getting argument list too long...
So, any help would be appreciated. (6 Replies)
Discussion started by: sachinkl
6 Replies
9. Shell Programming and Scripting
Hi,
I have a script doing backup to synology server, the script create new folder each day with the date as being folder name i.e. 2018-07-30. Just before creating the new folder I want the script to find the oldest folder from the list and delete it including its content.
for example... (3 Replies)
Discussion started by: humble_learner
3 Replies
RMM(1) [nmh-1.5] RMM(1)
NAME
rmm - remove messages
SYNOPSIS
rmm [+folder] [msgs] [-unlink | -nounlink] [-version] [-help]
DESCRIPTION
By default, rmm will remove the specified messages by renaming each of the message files with a site-dependent prefix (usually a comma).
Such files will then need to be removed in some manner after a certain amount of time. Many sites arrange for cron to remove these files
once a day, so check with your system administrator.
Alternately, if you wish for rmm to really remove the files representing these messages, you can use the -unlink switch. But messages
removed by this method cannot be later recovered.
If you prefer a more sophisticated method of `removing' messages, you can define the rmmproc profile component. For example, you can add a
profile component such as
rmmproc: /home/foouser/bin/rmm_msgs
then instead of simply renaming the message file, rmm will call the named program or script to handle the files that represent the messages
to be deleted.
Some users of csh prefer the following:
alias rmm 'refile +d'
where folder `+d' is a folder for deleted messages, and
alias mexp 'rm `mhpath +d all`'
is used to "expunge" deleted messages.
The current message is not changed by rmm, so a next
will advance to the next message in the folder as expected.
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
rmmproc: Program to delete the message
SEE ALSO
refile(1), rmf(1)
DEFAULTS
`+folder' defaults to the current folder
`msgs' defaults to cur
`-nounlink'
CONTEXT
If a folder is given, it will become the current folder.
BUGS
Since refile uses your rmmproc to delete the message, the rmmproc must NOT call refile without specifying -normmproc, or you will create an
infinte loop.
MH.6.8 11 June 2012 RMM(1)