Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Puppy This forum is for the discussion of Puppy Linux.


  Search this Thread
Old 05-12-2014, 11:27 AM   #1
Registered: Mar 2014
Distribution: Linux Puppy
Posts: 870

Rep: Reputation: 46
Suppress message from zip

I would to suppress the error message when there are no doc files present.

I have this, but it does not work.
zip -u Linux_Documents *.txt *.doc *.rtf 2&>1 > /dev/null
I understand that errors are written to stderr "2"
Old 05-12-2014, 01:36 PM   #2
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Debian Jessie (8) and Sid (unstable). In the process of converting to and learning FreeBSD
Posts: 902
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
You have the ampersand and the redirection in the wrong places. Note the ampersand follows the bracket.


zip -u Linux_Documents *.txt *.doc *.rtf > /dev/null 2>&1

The post below mine redirects only stderr to /dev/null. So if there's output to stdout you will see it. My example above will redirect both stderr and stdout to /dev/null so you will get no output whatsoever.

Last edited by goumba; 05-12-2014 at 01:42 PM.
Old 05-12-2014, 01:36 PM   #3
Senior Member
Registered: Dec 2013
Posts: 3,185

Rep: Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506
have you tried
zip -u Linux_Documents *.txt *.doc *.rtf 2>/dev/null
Old 05-12-2014, 02:55 PM   #4
Registered: Mar 2014
Distribution: Linux Puppy
Posts: 870

Original Poster
Rep: Reputation: 46
Thanks guys.

Script is working right.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux zip program's -d -tt option deletes all files from zip archive Arun Gupta Linux - Software 4 04-27-2011 07:06 PM
Strange warning message when accessing zip files on specific samba share bdb4269 Linux - General 4 01-31-2011 02:26 PM
suppress known warning message powah Programming 4 11-17-2007 08:34 PM
How to suppress particular warning message? hottdogg Programming 3 03-02-2007 01:15 AM
sending html text message with zip file attachment; Content-Type: multipart/mixed phelpsj Programming 1 06-22-2006 08:50 AM

All times are GMT -5. The time now is 06:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration