Some part of the manual is also poorly written.
"1.1.2 Origin of version sort and differences from natural sort"
After reading the above section, I am still not clear what is the
difference. It is better to show some examples to illustrate the
difference.
On 10/8/19, Peng
> At the risk of arguing over semantics,
> I'll say again: there is no "one correct" natural order standard,
> and therefore it is not "plain and simple" because there is no just
> "one" such order.
I don't think there is no commonly accepted "natural sort". For
example, I found another one that
Hi,
The following example shows that version sort is not natural sort. Is
natural sort supported in by `sort`?
$ printf '%s\n' G . | LC_ALL=C sort -k 1,1V
.
G
$ printf '%s\n' 1G 1. | LC_ALL=C sort -k 1,1V
1.
1G
$ printf '%s\n' 1G13 1.02 | LC_ALL=C sort -k 1,1V # The result order
should have been
Hi,
Since natural sort is provided in a few languages (as mentioned in the
Wikipedia page). Can it be supported by `sort` besides just
version-sort?
https://en.wikipedia.org/wiki/Natural_sort_order
--
Regards,
Peng
I have a TSV file with a column in hex format, e.g., 0x1a000, 0x17000, 0xe000.
Is there a way to sort the rows by this column in hex? Thanks.
--
Regards,
Peng
No. -t just shows the time of the directory itself. I want a summary
time which is the latest time of all the contents (including the ones
in the subdirecties, subsubdirs,...) in the directory.
On 1/29/20, Bernhard Voelker wrote:
> On 1/29/20 10:58 AM, Peng Yu wrote:
>> Hi,
>>
>
So a one-line summary is
When the target can be delete, unlink and rm -f are the same;
otherwise, unlink will complain about the error and exit with 1, but
rm -f will do neither.
On 1/29/20, Kaz Kylheku (Coreutils) <962-396-1...@kylheku.com> wrote:
> On 2020-01-29 01:45, Peng Yu wro
Hi,
It seems to me unlink and rm -f are the same if the goal is the delete
files. When are they different? Thanks.
--
Regards,
Peng
Hi,
For directories, ls shows in the time of the directory itself.
Sometimes, it is more important to show the latest time of files in
the directory in addition to the directory time.
Is there an easy way to show such information? Thanks.
--
Regards,
Peng
Hi,
I don't see how to change change time by touch. Is it possible with
touch? Thanks.
--time=WORD
change the specified time: WORD is access, atime, or use: equiv-
alent to -a WORD is modify or mtime: equivalent to -m
--
Regards,
Peng
Hi,
Python base64 decoder has the altchars option.
https://docs.python.org/3/library/base64.html
base64.b64decode(s, altchars=None, validate=False)¶
But I don't see such an option in coreutils' base64. Can this option
be added? Thanks.
--
Regards,
Peng
I got the following run time on a file of 116M.
They are ranked in this order. Is this runtime order in general true?
sha1sum < sha384sum <~ sha512sum < sha256sum <~ sha224sum
==> sha1sum <==
real0m0.330s
user0m0.275s
sys 0m0.042s
==> sha224sum <==
real0m0.679s
user
When I `ls` a directory, the content will be shown without the
directory path. Is there an option of `ls` to prepend the directory
path?
Note that I am not looking for this way, as it involves shell.
ls d/*
Thanks.
--
Regards,
Peng
It seems that -s of sort is not useful when -m is used based on my
simple test case. But I am not completely sure. Could anybody let me
know if this is the case? Thanks.
--
Regards,
Peng
Are you the author of -m? If not, maybe the author of -m should knows how
it works with -s? If not, maybe this should be documented anyway?
On Mon, May 11, 2020 at 5:01 PM Eric Blake wrote:
> On 5/11/20 4:18 PM, Peng Yu wrote:
> > I used real files (already sorted) to test whether
to authors who made -m and -s. My question should be clear?
On 5/11/20, Eric Blake wrote:
> On 5/9/20 4:31 PM, Peng Yu wrote:
>> It seems that -s of sort is not useful when -m is used based on my
>> simple test case. But I am not completely sure. Could anybody let me
>> kno
Hi,
It looks like some time zone abbreviations are not supported by
`date`. For example, THA is not supported. Can a more comprehensive
support be added? Thanks.
https://www.timeanddate.com/time/zone/thailand
--
Regards,
Peng
Hi,
It seems that time zone string like CET, PST are supported by `date`.
But I don't find a complete list of such strings supported by `date`.
Is there a doc that describe all of them? Thanks.
--
Regards,
Peng
Hi,
I tried to tail a large file (2.8GB) to get is last 10 lines. It runs very fast.
How is this achieved? Does tail do it differently between a file
(random disk access) and a pipe (sequential disk access)? Thanks.
--
Regards,
Peng
Hi,
Many people use dd to test disk performance. There is a key option dd,
which I understand what it literally means. But it is not clear how
there performance measured by dd using a specific bs maps to the disk
performance of other I/O bound programs. Could you anybody let me know
the
Hi,
It seems that ../../ can not be resolved symbolically by ls. See the
following example. I'd like `ls ..` to print both a and b.
Unfortunately, it only print b because it thinks it is in /tmp/i/a/b
instead of /tmp/i/b. Is there a way to use symbolic pwd instead of abs
pwd? Thanks.
/tmp/i$
Hi,
I want to make sure sort is always use UTF-8. But I am not sure what
locale is universally available on all OSes. Does anybody know what is
the correct way to make sure sort by UTF-8 in all machines that
coreutils is installed? Thanks.
--
Regards,
Peng
Hi,
When I try `ls -l dir1 dir2`, the order of dir1 and dir2 in the output
is not necessarily the same as the input. How to make it the same as
the input order? Thanks.
--
Regards,
Peng
Hi,
I am wondering whether there is a way to do something similar to od,
but respect UTF-8 characters.
For example, instead of print this,
$ od -c -t x1 -Ax <<< α
00 � � \n
ce b1 0a
03
I want to print this. Basically, if it is a printable UTF that does
not require
On Wed, Mar 24, 2021 at 4:52 PM Bob Proulx wrote:
>
> Peng Yu wrote:
> > It seems that both `mkfifo` and `mknod ... p` can create a fifo. What
> > is the difference between them? Thanks.
>
> The mknod utility existed "for a decade" in Unix (don't quote me on
&
Hi,
It seems that both `mkfifo` and `mknod ... p` can create a fifo. What
is the difference between them? Thanks.
--
Regards,
Peng
cfb88 /* 69 vars
> */) = 0
> mknod("mkfifo", S_IFIFO|0666) = 0
>
> $ ls -l mk*
> prw-r--r-- 1 steeve steeve 0 Mar 13 08:45 mkfifo
> prw-r--r-- 1 steeve steeve 0 Mar 13 08:45 mknod
>
>
>
> On Sat, Mar 13, 2021 at 8:38 AM Peng Yu wrote:
>
>&g
Hi,
I see modification time can be printed in this format.
$ stat -c '%y' file.txt
2017-07-31 17:50:54.0 +0100
Is there a way to directly print it as 20170731-1750? Thanks.
--
Regards,
Peng
I got 1 instead of 2 in the following example. How to count the last
even when it does not end with a newline character? Thanks.
$ printf 'a\nb'|wc -l
1
--
Regards,
Peng
Hi,
Suppose that I want to sort an input by column 1 and column 2 (column
1 is of a higher priority than column 2). The input is already sorted
by column1.
Is there a way to speed up the sort (compared with not knowing column
1 is already sorted)? Thanks.
--
Regards,
Peng
On Wed, Aug 11, 2021 at 5:29 AM Carl Edquist wrote:
>
> On Tue, 10 Aug 2021, Kaz Kylheku (Coreutils) wrote:
>
> > On 2021-08-07 17:46, Peng Yu wrote:
> >> Hi,
> >>
> >> Suppose that I want to sort an input by column 1 and column 2 (column
>
On Wed, Aug 11, 2021 at 1:43 PM Kaz Kylheku (Coreutils)
<962-396-1...@kylheku.com> wrote:
>
> On 2021-08-11 05:03, Peng Yu wrote:
> > On Wed, Aug 11, 2021 at 5:29 AM Carl Edquist
> > wrote:
> >> (With just a bit more work, you can do all your sorting in a single
&
Hi,
$ date -d 'last Tue' +%Y-%m-%d
2021-07-13
$ date +%Y-%m-%d
2021-07-20
$ date -d 'last Mon' +%Y-%m-%d
2021-07-19
I want to get the last day of week not in the future. In the above
example, I want to get this Tue (2021-07-20) instead the last Tue
(2021-07-13). But for Mon, I want to get
Hi,
When I use mv -i and choose n so that the destination will not be
overwritten, the return status is still zero. Is there a way to let mv
return nonzero status to reflect that n is chosen by the user? Thanks.
--
Regards,
Peng
https://lists.gnu.org/archive/html/help-bash/2023-02/msg00053.html
Bash loadable `mkdir -p` has a problem when multiple loadable `mkdir
-p` is called on the same directory simultaneously.
But I never see coreutils' `mkdir -p` has the same problem. Does
coreutils' `mkdir -p` do something extra to
system call of mkdir. But since they find
the target is already created and is a directory, they will not
complain about the error system call mkdir. That is why I never see an
error similar to that of bash loadable `mkdir -p`. Is it so?
On 2/9/23, Pádraig Brady wrote:
> On 09/02/2023 14:57,
I'm wondering if there is a similar program to 'head' that accepts gz
files. (just as zgrep to grep)
I have the following file head.txt. I'm wondering what the correct way
is to change the tab to a backslash and the character 't'.
$ tr \t \\t head.txt
a a b c
$ cat head.txt
a a b c
alias dir='ls --color=auto --format=vertical'
The above alias doesn't distinguish the color for a symbol link
pointing to a file and a symbol link pointing to a dir. I'm wondering
if there is a way to configure it to do so?
On Wed, Dec 30, 2009 at 7:34 PM, Eric Blake e...@byu.net wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Peng Yu on 12/30/2009 4:09 PM:
alias dir='ls --color=auto --format=vertical'
The above alias doesn't distinguish the color for a symbol link
pointing to a file
On Wed, Dec 30, 2009 at 8:47 PM, Eric Blake e...@byu.net wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Peng Yu on 12/30/2009 7:30 PM:
Use dircolors (as in adding the line:
eval `dircolors path/to/preferences`
http://linux.die.net/man/5/dir_colors
According
On Thu, Dec 31, 2009 at 9:31 AM, Chris Jones cjns1...@gmail.com wrote:
On Thu, Dec 31, 2009 at 07:28:05AM EST, Eric Blake wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Chris Jones on 12/30/2009 11:26 PM:
But pardon my ignorance, where exactly do you specify LINK target?
I don't see an option that sorts ls result by file size. Could
somebody let me know if there is such an option?
Suppose I have directory a and b, the following command will copy the
content of a to b/a, rather than overwrite the directory 'b' by the
directory 'a'. I'm wondering if there is an option to overwrite 'b'?
cp -r a b
'touch' will not make the file size empty if the file is not empty. I
don't not want to use 'rm -f' first then touch because I might
accidentally remove something if I type anything wrong. Could somebody
let me a better way to create an empty file?
'ls -l' shows the symbolic link and its target. I could parse the
output. But I'm wondering whether there is a convenient command that
only print the target if it is a symbolic link otherwise print
nothing? Thank you for your help.
I'm wondering if there is any tool that can do almost exact the same
thing as mv, but it can maintain symbolic links.
mv doens't maintain relative symbolic links. For example, I have file
/tmp/A/file1.txt and a symbolic link /tmp/file1.txt that point to
A/file.txt (by the relative path). If I mv
On Fri, May 7, 2010 at 5:03 PM, Bob Proulx b...@proulx.com wrote:
severity 6138 wishlist
thanks
Peng Yu wrote:
I'm wondering if there is any tool that can do almost exact the same
thing as mv, but it can maintain symbolic links.
mv doens't maintain relative symbolic links. For example, I
On Mon, May 10, 2010 at 4:37 AM, Voelker, Bernhard
bernhard.voel...@siemens-enterprise.com wrote:
Peng Yu wrote:
I agree with you that this is may not be possible for whole file
system. But under the assumptions that symbolic links and their
targets are always in a number of directories (user
ls -go gives me permission and file sizes. But I only want to show
time and file names. Would you please let me know what command to use?
--
Regards,
Peng
When I use wc -l *.txt, it show the total number of lines at the end.
I don't necessary need this last line. Is there a way to disable it?
--
Regards,
Peng
On Tue, Jun 8, 2010 at 1:02 PM, Greg Wooledge wool...@eeg.ccf.org wrote:
On Tue, Jun 08, 2010 at 12:53:47PM -0500, Peng Yu wrote:
I have a program that only accept argument with a give suffix
./program xxx.suffix
If I use process substitution, which gives me /dev/fd/xx, it will not
work
Hi,
I don't think that I completely understand what key means. In the
following example, I thought that --key=2 should order the lines by
the 2nd letter in each line without reordering the lines with the same
2nd letter. But it turns out my understanding is not correct. For
example, u a was
On Thu, Jun 10, 2010 at 11:39 AM, Peng Yu pengyu...@gmail.com wrote:
Hi,
I don't think that I completely understand what key means. In the
following example, I thought that --key=2 should order the lines by
the 2nd letter in each line without reordering the lines with the same
2nd letter
Hi,
I need to reorder the fields in a file. But the -f option can not be
used to reorder field 1 and field 2.
Basically, I want the original 1st field as the new 2nd field and the
original 2nd field the first. Is reordering fields possible with cut.
$ cat input.txt
a b c
e f
Hi,
-k option of sort only allow a range of files. But I would like a list
of fields. For example, field 7, field 3 then field 8. Would you
please let me know how to do it?
--
Regards,
Peng
I'm trying to cp -MM to -M. But so far I don't have a way to do it.
Would you please let me know what is the correct way to cp from -MM to
-M?
$ cp -r -- -MM/ -- -M
cp: target `-M' is not a directory
$ ll -go
total 0
drwx-- 2 64 2010-06-11 14:35 -MM
--
Regards,
Peng
Hello,
The modifiers of -k are discussed in the examples in 'info sort'
rather than in the main entry of -k. I feel that this be improved by
clearly describe each modifier under the main entry of -k. It is not
very clear to how many modifiers there are.
--
Regards,
Peng
2010/6/17 Pádraig Brady p...@draigbrady.com:
On 17/06/10 03:07, Peng Yu wrote:
Hello,
The modifiers of -k are discussed in the examples in 'info sort'
rather than in the main entry of -k. I feel that this be improved by
clearly describe each modifier under the main entry of -k
On Fri, Jul 2, 2010 at 2:51 PM, Eric Blake ebl...@redhat.com wrote:
[adding bug-coreutils, to create a bug id to track this by]
On 06/15/2010 09:23 PM, Peng Yu wrote:
I need to add an additional common suffix to the files splited by
split. Right now, I have to use mv to do so. But I feel
Hi,
Suppose I have a file 'a/b/c/d/e/f', I want to copy it to 'target'
with the parent 'd/e'. I.e., the resulted file is 'target/d/e/f'.
I can make a bash script to do so, but I wondering if there is an
existing command or option. Thanks!
--
Regards,
Peng
Hi,
I have the following script. When the number to the right of 'seq' is
large (as 10 in the example), the script will hang. But when the
number is small (say 1000), the script can be finished correctly. I
suspect that the problem is that there is a limit on the buffer size
for fifo. Is it
101 - 162 of 162 matches
Mail list logo