Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    You want to "move zipped files to some other directory using mv command and then remove all files from original location". Why? mv copies and then removes from the source location. You don't need rm anymore. PS : please have a look at the difference between ; and && Commented Jan 11, 2017 at 18:54
  • @schaiba He's removing the files he zipped. The "zipped files" he's moving are the ones in the archive, I believe. Commented Jan 11, 2017 at 18:59
  • 4
    Why are you running zip and mv in the background??? Commented Jan 11, 2017 at 23:33
  • @Schaiba : It's correct. This is what i mean , "move zipped files to some other directory using mv command and then remove all files from original location". But somehow rm -rf *; getting executed before mv command. Checking exit status with &&, did not help here. Commented Jan 15, 2017 at 11:59
  • The exit status check is done with echo $?. Commented Jan 15, 2017 at 12:39