Colin Marc
1406bb3801
update usage for rm -f
2014-11-04 00:40:15 +01:00
Colin Marc
5d6bea147b
Merge pull request #2 from snoble/snoble-rm-f
...
Add -f to rm to suppress errors on non-existence.
2014-11-04 00:39:25 +01:00
Steven H. Noble
dce42f8c73
Add -f to rm to suppress errors on non-existence.
2014-11-03 15:20:59 -05:00
Colin Marc
124daea3f1
gomft
2014-11-03 20:20:11 +01:00
Colin Marc
84fe83ccf2
remove GOCMD nonsense
2014-11-01 19:43:24 +01:00
Colin Marc
e51943b889
add clean to the makefile
2014-11-01 19:42:41 +01:00
Colin Marc
5288ee46f3
remove unused import
2014-11-01 19:40:55 +01:00
Colin Marc
6c23e98338
add tests for head and tail
2014-11-01 18:58:53 +01:00
Colin Marc
f9b2974614
Instead of using a Scanner to read lines in head, look for the offset and copy
...
This fixes two bugs:
- trailing CRs were being stripped from the output, because the ScanLines
implementation does that
- long files without newlines weren't being printed at all
2014-11-01 18:56:56 +01:00
Colin Marc
cc34a26dc3
another test fix
2014-11-01 18:36:15 +01:00
Colin Marc
5c76a7becb
fix touch test
2014-11-01 18:34:20 +01:00
Colin Marc
7916986dd4
fix rm tests
2014-10-31 21:39:07 +01:00
Colin Marc
3b3141ba95
add tests for cat
2014-10-31 21:38:12 +01:00
Colin Marc
5baa02d9fe
add tests for mkdir and touch
2014-10-31 21:19:37 +01:00
Colin Marc
de48a95262
add tests for mv
2014-10-31 21:09:20 +01:00
Colin Marc
a0befc4db3
when rming, change the Op for the error to 'rm'
2014-10-31 21:04:46 +01:00
Colin Marc
e48cf99b93
add some rm tests
2014-10-31 21:00:04 +01:00
Colin Marc
56af180726
refactor out caching in cmd/hdfs
...
It's definitely a premature optimization, and also blows up with huge
directories.
2014-10-31 20:46:22 +01:00
Colin Marc
5cd50d3b56
attempt to fix travis
2014-10-31 20:15:04 +01:00
Colin Marc
e04c25b9bb
add some simple shell tests
2014-10-31 19:18:16 +01:00
Colin Marc
f6f2303527
fix a glob issue where a plain '*' wasn't considered a glob
2014-10-31 19:16:18 +01:00
Colin Marc
9e9ca8d4aa
don't print a leading newline in ls
2014-10-31 18:46:27 +01:00
Colin Marc
50cf267dac
properly interpret exceptions in remove
2014-10-31 18:43:20 +01:00
Colin Marc
ca1bb374ad
actually run tests on travis
2014-10-29 14:06:41 +01:00
Colin Marc
b86acd4113
Handle the directory bit of os.FileMode correctly
...
- make sure we set it, when running mkdir
- default to 0755 instead of 0644
- make sure we return it in FileInfo#Mode, even though hdfs does not
2014-10-28 14:37:31 +01:00
Colin Marc
e1fb152563
when no group is passed to chown, set the group to the owner
2014-10-28 13:50:02 +01:00
Colin Marc
22235205bc
use os.PathError ~everywhere
2014-10-28 13:49:30 +01:00
Colin Marc
088ba32593
readme cleanup
2014-10-27 14:11:54 +01:00
Colin Marc
86d8ef042b
move acknowledgements to the end of the readme
2014-10-27 14:08:03 +01:00
Colin Marc
7744254a03
fetch defaults lazily
2014-10-26 20:09:05 +01:00
Colin Marc
8011760523
add cat/head/tail to knownCommands
2014-10-26 19:57:31 +01:00
Colin Marc
b5f980b25e
rename bash_autocomplete to be more idiomatic
2014-10-26 18:46:54 +01:00
Colin Marc
1228e252ec
when running ls with no args, ls the "cwd"
2014-10-26 18:39:10 +01:00
Colin Marc
07c73b783e
use io.ReadFull when reading a response from the namenode
...
This prevents partial reads, which can cause malformed (but correct-looking)
messages to be parsed out.
2014-10-26 18:27:51 +01:00
Colin Marc
6dbe9a155f
gofmt
2014-10-26 18:27:44 +01:00
Colin Marc
8571225ee7
use require.Nil where appropriate
2014-10-26 18:27:35 +01:00
Colin Marc
e91899cbac
strip only the very last newline
...
It's part of the behavior of tail that the very last newline in a fail is
ignored. However, we were ignoring the trailing newline at the end of every
search block, which could cause us to print extra lines.
2014-10-26 13:10:53 +01:00
Colin Marc
1a13c828a6
add a test for reading long directories
2014-10-26 12:55:02 +01:00
Colin Marc
24193296de
fix make
2014-10-25 21:45:25 +02:00
Colin Marc
e42dcedfac
Merge pull request #1 from colinmarc/cmd
...
Add an hdfs binary (wip)
2014-10-25 21:42:48 +02:00
Colin Marc
d4b64962bd
add note to readme
2014-10-25 21:42:31 +02:00
Colin Marc
ab2e6fa431
add cat and tail/head
2014-10-25 21:34:07 +02:00
Colin Marc
40cc7a9564
add get and getmerge [-n]
2014-10-24 23:43:52 +02:00
Colin Marc
0d6ff021d8
add getopt to makefile
2014-10-24 23:43:52 +02:00
Colin Marc
ce8a6405b1
add chmod [-R] and chown [-R]
2014-10-24 23:43:52 +02:00
Colin Marc
537a7a191f
clean up completion
2014-10-24 23:43:52 +02:00
Colin Marc
458c4ae7d9
add touch [-c]
2014-10-24 23:43:51 +02:00
Colin Marc
1ca4f96d79
add mkdir [-p]
2014-10-24 23:43:51 +02:00
Colin Marc
173f5af29d
add mv [-fT]
2014-10-24 23:43:51 +02:00
Colin Marc
7496c1ff3e
improve error handling
2014-10-24 23:43:51 +02:00