snakebite
snakebite copied to clipboard
mkdir, mv, touchz return 0 on error while rmdir, rm and ls return 255
here's demo
md4:~$ snakebite mkdir /tmp/x; echo $?
OK: /tmp/x
0
md4:~$ snakebite mkdir /tmp/x; echo $?
ERROR: /tmp/x (reason: mkdir: `/tmp/x': File exists)
0
md4:~$ snakebite mv /tmp/x /tmp/y; echo $?
OK: /tmp/x
0
md4:~$ snakebite mv /tmp/y /tmp/y; echo $?
ERROR: /tmp/y (reason: )
0
md4:~$ snakebite rmdir /tmp/y; echo $?
OK: /tmp/y . Moved /tmp/y to /user/tworec/.Trash/Current/tmp/y
0
md4:~$ snakebite rmdir /tmp/y; echo $?
`/tmp/y': No such file or directory
255
md4:~$ snakebite touchz /tmp/x; echo $?
OK: /tmp/x
0
md4:~$ snakebite touchz /tmp/x; echo $?
ERROR: /tmp/x (reason: File already exists)
0
md4:~$ snakebite ls /tmp/x; echo $?
Found 1 items
-rw-r--r-- 3 tworec hdfs 0 2016-12-02 12:39 /tmp/x
0
md4:~$ snakebite rm /tmp/x; echo $?
OK: /tmp/x . Moved /tmp/x to /user/tworec/.Trash/Current/tmp/x1480682260035
0
md4:~$ snakebite rm /tmp/x; echo $?
`/tmp/x': No such file or directory
255
md4:~$ snakebite ls /tmp/x; echo $?
`/tmp/x': No such file or directory
255
mkdir, mv and touchz are allways returing 0, no metter what is te operation status
don't tested rest of commands
ping! :) Is there anybody here?