Commit graph

845 commits

Author SHA1 Message Date
shutefan
c20ce9bf74 cp: fix compiler warnings
Fixes seven compiler warnings in cp.rs:
- unused imports: `c_char`, `c_int`
  -> removed
- value assigned to `inode` is never read
  -> no more default value, immutable
- value assigned to `nlinks` is never read
  -> no more default value, immutable
- unused variable: `src_path`
  -> removed
- unused `std::result::Result` which must be used
  -> only in error on unsupported platforms (Windows) which is
     already handled with #[cfg(unix)]
- variable `preserve_context` is assigned to, but never used
  -> removed
- value assigned to `preserve_context` is never read
  -> see above, remove
2017-10-04 21:43:06 +02:00
Alex Lyon
ab259194f3 Merge pull request #1066 from Matt8898/master
cp: add support for --attributes-only and setting timestamps, links and xattrs
2017-10-01 01:43:09 -07:00
Yury Krivopalov
ac375d8b7d tr: add squeeze option 2017-09-21 22:15:05 +03:00
Yury Krivopalov
b4d8265a07 tr: generaze translation 2017-09-21 22:15:01 +03:00
Yury Krivopalov
c59e375c7a tr: use as_bytes on whole output string
On my environment on 1MiB file with this fix tr takes 30ms,
instead of 44ms without fix.
2017-09-21 22:14:56 +03:00
Matt8898
e33de238ca cp: add support for --preserve=all. 2017-09-13 16:21:33 +02:00
Matteo Semenzato
6476f6e616 cp: add support for preserving links on windows. 2017-08-23 15:20:23 +02:00
Matt8898
f7072b7dfe cp: add support for preserving links on unix. 2017-08-19 13:43:37 +02:00
Matt8898
4cb727f80b cp: Add support for preserving xattrs. 2017-08-19 13:42:44 +02:00
Matt8898
6d3e9eabe4 cp: add support for --preserve. 2017-08-19 13:42:44 +02:00
Matt8898
38dd8c5836 cp: use filetime to set timestamps. 2017-08-19 13:42:44 +02:00
Matt8898
03432db951 Added support for preserving timestamps. 2017-08-19 13:42:44 +02:00
Matt8898
48ae9b64ba cp: add support for --attributes-only. 2017-08-19 13:42:44 +02:00
Ian Douglas Scott
2853905ebc
install: Fix verbose mode
- Do not mark as unimplemented
- Use ascii quotes
- Print newline
2017-08-14 13:16:50 -07:00
Ian Douglas Scott
79d5d14d11
Make install work on Redox, by using fs::set_permissions
This is the same change I made earlier to chmod
2017-08-12 15:20:50 -07:00
Ian Douglas Scott
de4bee2321
mktemp fix for Redox 2017-08-12 15:17:37 -07:00
Ian Douglas Scott
13d97ee1cc
Correct behavior of cp -r with non-existent dest 2017-08-09 15:35:13 -07:00
Alex Lyon
c827795d17 Merge pull request #1056 from Matt8898/master
cp: add support for --reflink.
2017-07-28 23:34:47 -07:00
Matt8898
a73c74ecbc cp: add support for --reflink. 2017-07-28 10:42:21 +02:00
mpkh
61b15f5c1c Merge pull request #1061 from Arcterus/ls-fix
ls: fix line that was forgotten in #1057
2017-07-27 11:40:08 +04:00
mpkh
678cb5f81a Merge pull request #1060 from Arcterus/rm-refactor
rm: massive refactor
2017-07-27 11:29:04 +04:00
Alex Lyon
86aa1eb47a ls: fix line that was forgotten in #1057 2017-07-27 00:09:42 -07:00
Alex Lyon
b39689ac37 rm: massive refactor 2017-07-26 23:21:23 -07:00
Alex Lyon
4a5b76f678 Merge pull request #1057 from ids1024/ls
Fix ordering of ls -t, which was backwards
2017-07-26 21:18:00 -07:00
Ian Douglas Scott
3c3f5ab2a3
Fix ordering of ls -t, which was backwards 2017-07-26 20:57:44 -07:00
Ian Douglas Scott
b9446c0766
Make ls build on Redox 2017-07-25 16:26:36 -07:00
Ian Douglas Scott
99af79a7fa
Cast umask result, and comment about Redox 2017-07-23 17:28:16 -07:00
Ian Douglas Scott
d8494974bc
Make chmod use std where possible instead of libc; compile for Redox 2017-07-22 20:46:15 -07:00
Matt8898
32bd2843d5 cp: add support for --update 2017-07-22 12:03:26 +02:00
Joshua Miller
7dafb649d5 implement many copy flags
- Refactored towards extensibility
2017-07-16 19:20:07 -05:00
Joshua Miller
e8073d2596 pin dependencies 2017-07-15 15:16:09 -05:00
Alex Lyon
7ef27acb05 Merge pull request #1046 from Matt8898/cp
cp: Add -r flag
2017-07-02 14:12:08 -07:00
Alex Lyon
eb75085595 Merge pull request #1035 from shinh/ln
ln: Fix how it selects the form
2017-06-29 20:33:33 -07:00
mpkh
ee9013215b Merge pull request #1044 from Shnatsel/fnv-hash-map
tr: use FnvHashMap instead of default HashMap backed by SipHasher
2017-06-02 13:56:13 +00:00
Matt8898
f4ea1a9cc5 cp: added -r/--recursive flag 2017-06-02 13:19:33 +02:00
Hiroki Noda
a30d732463 nproc: fix conditional compilation 2017-05-29 12:08:47 +09:00
Hiroki Noda
5e95d3752e nproc: fix comment position 2017-05-29 11:36:26 +09:00
Hiroki Noda
57dd3703d0 nproc: fix compilation on windows 2017-05-29 10:06:45 +09:00
Hiroki Noda
adb39d411b nproc: fix windows 2017-05-29 09:41:29 +09:00
Hiroki Noda
3a4b5ff8ed nproc: counts CPU cores via affinity mask if available on Linux
* Upgrade num_cpus crate to 1.5.0.
* Use sysconf(_SC_NPROCESSORS_CONF) when `--all` query given.
2017-05-29 08:56:33 +09:00
Sergey "Shnatsel" Davidoff
44cf7798bd tr: use FnvHashMap instead of default HashMap backed by SipHasher. FnvHashMap is much faster for small inputs like intergers, and we literally have a hashmap with chars as keys 2017-05-26 18:49:39 +03:00
Sergey "Shnatsel" Davidoff
c47ce19620 tr: use streaming instead of buffering the entire input and output 2017-05-24 17:58:04 +03:00
Matt8898
2a045fae37 uucore: add support for optflagmulti and optmulti. 2017-04-22 21:36:01 +02:00
theGeekPirate
589847aa2f Ensure "Linux" not targeted instead of "Linu" =D
#[cfg(not(target_os = "linux"))] spelling mistake
2017-04-19 00:18:29 -07:00
Shinichiro Hamaji
d556c9e398 ln: Fix how it selects the form
ln had a bunch of problems:

1. `ln -s target` didn't work (2nd form in help).
2. `ln -t tmp` wasn't an error. We should check if files are
   empty first.
3. `ln -s file dir` didn't create dir/file.
4. `ln -s -T file dir` was removing `dir`.
5. Test cases for 4 say this is for compatibility with GNU
   coreutils but I couldn't find this feature.
2017-04-09 02:32:57 +09:00
Shinichiro Hamaji
416c2b7f89 rm: Remove invalid symlinks
Checking with file.exists() was not good for this purpose as
Path::exists() returns false for invalid symlinks.
2017-04-09 01:33:07 +09:00
Alex Lyon
5f1cb07df8 Merge pull request #1033 from shinh/rm-dir-link
rm: Remove symlinks to directories without -r
2017-04-03 08:35:37 -07:00
Shinichiro Hamaji
bb1d8956eb rm: Fail when symlink_metadata() fails 2017-04-04 00:10:45 +09:00
Alex Lyon
a2de3997b9 Merge pull request #1031 from shinh/mkdir-dup
mkdir: Fix the behavior for existing files
2017-04-02 20:50:22 -07:00
Alex Lyon
df960d211c Merge pull request #1034 from shinh/ls-n
ls: Implement -n option
2017-04-02 20:46:13 -07:00