The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Getting error by renaming all the files in a folder sunitachoudhury Shell Programming and Scripting 4 04-10-2008 07:34 AM
Getting unusual error - moving files to another directory aismann Shell Programming and Scripting 4 12-21-2007 03:29 AM
moving a file to a new folder and automated ftp dineshr85 Shell Programming and Scripting 1 10-05-2007 11:24 AM
trnsmiting thousands ftp files and get an error message alexcol Shell Programming and Scripting 3 09-27-2006 10:58 PM
move files from folder thats are not empty Steven UNIX for Dummies Questions & Answers 8 11-21-2001 10:05 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-19-2001
Steven Steven is offline
Registered User
  
 

Join Date: Nov 2001
Posts: 2
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.
  #2 (permalink)  
Old 11-19-2001
PxT's Avatar
PxT PxT is offline Forum Advisor  
Registered User
  
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
Try using the '-f' option to mv
  #3 (permalink)  
Old 11-19-2001
doeboy's Avatar
doeboy doeboy is offline
Registered User
  
 

Join Date: Oct 2001
Location: Here
Posts: 137
Try adding the following to the end of your command:

> /dev/null 2>&1

So, if you want to run a command, but don't want any output visible (including errors) it would look like this:

mycommand > /dev/null 2>&1
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:26 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0