11-19-2001
Suppres error message when moving files from empty source folder
Hi,
I would like to write a shell script that moves files from one folder to another without retrieving the error 'can not acces/find file or folder' when the source folder is empty.
Any ideas,
Thx in advance,
Steven.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I would like to write a shell script that moves files from one folder to another without retrieving the error 'can not find file or folder' when the folder is empty.
Any ideas,
Thx in advance,
Steven. (8 Replies)
Discussion started by: Steven
8 Replies
2. Shell Programming and Scripting
Hi,
I have a folder which contain the log files. The folder may contain sub folders as well. I want to move the contents of the log folder to tmp folder periodically. I have used the command.
LOG_DIR=/logs
DESTINATION_DIR=/tmp/logs
find ${LOG_DIR} -mtime +1 -exec mv {}... (10 Replies)
Discussion started by: farooqpervaiz
10 Replies
3. Shell Programming and Scripting
Hi All
I need a shell script for move the 1 year old files from one folder to another folder with date and time.
How to write a shell script for the same pls hepl me out.
thanx in advance
Thanx
Lalit (2 Replies)
Discussion started by: lalitkumar
2 Replies
4. Shell Programming and Scripting
Hi
I need to move last 1 year old files from one folder to another location on same server.How to write a shell script for the same?
thanx
Lalit (8 Replies)
Discussion started by: lalitkumar
8 Replies
5. UNIX for Advanced & Expert Users
Hi,
I need to move 1000s of files from one folder to another.
Actually there are 100K+ files.
Source dir : source1
Target dir : target1
Now if try cp or mv commands I am getting an error message : Argument List too long.
I tried to do it by the time the files are created in the... (1 Reply)
Discussion started by: unx100
1 Replies
6. Shell Programming and Scripting
I have a more than 10 K files in a folder. They are accumulated in a period of more than an year (Say from 13th July 2010 to 4th June 2011). I need to perform housekeeping on this. The requirement is to create a folder like 13Jul2010,14July2010,......3June2011,4June2010 and then from the main... (2 Replies)
Discussion started by: realspirituals
2 Replies
7. Shell Programming and Scripting
Hi guys can you please help me with a script to find files with one row/1 line of content then move the file to another directory my script below runs but nothing happens to the files....Alternatively Ca I get a script to find the *.csv files with "wc -1" results = 1 then create a list of those... (5 Replies)
Discussion started by: Dj Moi
5 Replies
8. UNIX for Dummies Questions & Answers
hello there- first post here- maybe someone can help-
Basically I am trying to copy the contents of a folder to a different folder that has a variable name.
the content I want to copy would be in a folder on my desktop called: myfolder
the variable folder would look something like: ... (3 Replies)
Discussion started by: infothelonghaul
3 Replies
9. Shell Programming and Scripting
I recently bought Synology server and realised it can run scripts. I would need fairly simple script which moves all files and folders from ARCHIVE folder to WORKING folder. I would also need to maintain folder structure as each of the folders may contain subfolders. How would I go about it as I am... (1 Reply)
Discussion started by: ###
1 Replies
10. Shell Programming and Scripting
I need help to write shell script to copy files from one server to another server.
Source Directory UAE(inside i have another folder Misc with files inside UAE folder).I have to copy this to another server UAE folder( Files should be copied to UAE folder and Misc files should be copied in target... (3 Replies)
Discussion started by: naresh2389
3 Replies
RMF(1) [nmh-1.5] RMF(1)
NAME
rmf - remove an nmh folder
SYNOPSIS
rmf [+folder] [-interactive | -nointeractive] [-version] [-help]
DESCRIPTION
Rmf removes all of the messages (files) within the specified (or default) folder, and then removes the folder (directory) itself.
If there are any files within the folder which are not a part of nmh, they will not be removed, and an error will be produced. If the
folder is given explicitly or the -nointeractive option is given, then the folder will be removed without confirmation. Otherwise, the
user will be asked for confirmation. If rmf can't find the current folder, for some reason, the folder to be removed defaults to `+inbox'
(unless overridden by user's profile entry "Inbox") with confirmation.
If the folder being removed is a subfolder, the parent folder will become the new current folder, and rmf will produce a message telling
the user this has happened. This provides an easy mechanism for selecting a set of messages, operating on the list, then removing the list
and returning to the current folder from which the list was extracted.
If rmf s used on a read-only folder, it will delete all the (private) sequences (i.e., "atr-seq-folder" entries) for this folder from your
context without affecting the folder itself.
Rmf irreversibly deletes messages that don't have other links, so use it with caution.
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
Inbox: To find the default inbox
SEE ALSO
rmm(1)
DEFAULTS
`+folder' defaults to the current folder, usually with confirmation
`-interactive' if +folder' not given, `-nointeractive' otherwise
CONTEXT
Rmf will set the current folder to the parent folder if a subfolder is removed; or if the current folder is removed, it will make "inbox"
current. Otherwise, it doesn't change the current folder or message.
BUGS
Although intuitively one would suspect that rmf works recursively, it does not. Hence if you have a sub-folder within a folder, in order
to rmf the parent, you must first rmf each of the children.
MH.6.8 11 June 2012 RMF(1)