Visit the LQ Articles and Editorials section
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, 12:27 PM   #1
Registered: Mar 2014
Distribution: Linux Puppy and Tahr Puppy
Posts: 629

Rep: Reputation: 8
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, 02: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: 900
Blog Entries: 4

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 02:42 PM.
Old 05-12-2014, 02:36 PM   #3
Senior Member
Registered: Dec 2013
Posts: 2,206

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

Original Poster
Rep: Reputation: 8
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 08:06 PM
Strange warning message when accessing zip files on specific samba share bdb4269 Linux - General 4 01-31-2011 03:26 PM
suppress known warning message powah Programming 4 11-17-2007 09:34 PM
How to suppress particular warning message? hottdogg Programming 3 03-02-2007 02:15 AM
sending html text message with zip file attachment; Content-Type: multipart/mixed phelpsj Programming 1 06-22-2006 09:50 AM

All times are GMT -5. The time now is 07:32 PM.

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