Re: feature request: echo --
I just use printf "%s\n" "-e"-e Regards Leslie Leslie Satenstein Montréal Québec, Canada On Friday, October 15, 2021, 06:38:19 p.m. GMT-4, Philip Rowlands wrote: On Fri, 15 Oct 2021, at 18:42, Roger Pack wrote: > It came to my attention recently that it seems not possible to "echo" the > string "-e" > $ echo "-e" Nitpick: the double quotes aren't doing anything here. > Perhaps echo could add a "--" style param like > > $ echo -- -e These are both covered by the documentation https://www.gnu.org/software/coreutils/manual/html_node/echo-invocation.html "... the normally-special argument ‘--’ has no special meaning and is treated like any other string." "If the POSIXLY_CORRECT environment variable is set, then when echo’s first argument is not -n it outputs option-like arguments instead of treating them as options." Thus the way to make this work is: $ POSIXLY_CORRECT=1 /bin/echo -e -e Cheers, Phil
Re: [PATCH] ls: add --sort=width (-W) option to sort by filename width
Perhaps FreeBSD would be interested in this enhancement. Regards Leslie Leslie Satenstein Montréal Québec, Canada On Friday, April 9, 2021, 6:52:10 p.m. EDT, Pádraig Brady wrote: On 09/04/2021 13:02, Carl Edquist wrote: > Dear Coreutils Maintainers, > > I'd like to introduce my favorite 'ls' option, '-W', which I have been > enjoying using regularly over the last few years. > > The concept is just to sort filenames by their printed widths. > > > (If this sounds odd, I invite you hear it out, try and see for yourself!) > > > I am including a patch with my implementation and accompanying tests - as > well as some sample output. And I'll happily field any requests for > improvements. I quite like this. It seems useful. Also doing outside of ls is quite awkward, especially considering multi column output. I would avoid the -W short option, as that would clash with ls from FreeBSD for example. It's probably best to not provide a short option for this at all. thanks! Pádraig
Re: patch: touch --verbose
HI Michael You declared Is it by default, initialized to false? Should you have expressed the define as static boolean verbose= false; Regards Leslie Leslie Satenstein Montréal Québec, Canada On Wednesday, April 7, 2021, 5:31:43 p.m. EDT, Michael Cook wrote: Attached, please find a patch to add the --verbose (-v) option to the touch command. As for rm, cp, ln, etc. Michael
Unexpected results between cp -u and cp -ru
Introduction=== /share2 is a backup of /share (each has many subdirectories) cp -u /share/* /share2 operates as described with man docs. The cp -u command only copies over newer files or when no file exists within /share2 Issue= The intent is to only update newer files within each sub-directory of /share and /share2. But ... by trying to do a recursive descent with cp -ru /share /share2 I am prompted to "confirm" overwrite for every source file that is newer than the target file? Is it normal behaviour? Does using the -r option negate the -u option? I am trying to do limited backup copies from /share to /share2 and only want to copy newer or missing files /dirs. I tried with rsync with the checksum option. Execution to do the cp -ru equivalent takes excessive amounts of time. Should the -r negate the -u function option? Regards Leslie Leslie Satenstein
Re: Disable b2sum from coreutils?
Look at the PATH statement and put it in the path directory ahead of the others, typically put your version into /usr/local/bin , which is generally in the search $PATH s (echo $PATH) /usr/local/bin:/usr/local/sbin:/usr/bin:/bin/usr/sbin Regards Leslie On Thursday, July 2, 2020, 1:19:19 a.m. EDT, Jeffrey Walton wrote: Hi Everyone, The BLAKE2 folks have optimized implementations for b2sum on i686, x86_64, NEON and PowerPC. It also has more options than the coreutils version. I'd like to disable b2sum in coreutils and use the BLAKE2 team's version. Is it possible to disable b2sum from coreutils? If so, how? Thanks in advance.
Re: suggestion: /etc/dd.conf
Just put the dd command into a scriptThat is what I do. I created a simple bash script that makes your actions easy and semi-automaticIt is attached. Licensed GPL2 GPL3 (FREE TO DO WITH IT WHAT YOU WANT) Regards Leslie Leslie Satenstein Montréal Québec, Canada #!/bin/bash # Author Leslie Satenstein 2019-01-12 # mydd1.sh Licensed as gpl3 # Yours to modify to your hearts content. # Not responsbile for your goofups # echo -e "\n$(basename $0 ) version 0.9 12Mar2019" MOUNT_INFO=$(mount -l | grep iso9660 ) DEVICE=$(echo $MOUNT_INFO | cut - -d' ' -f1 ) SIZE=${#DEVICE} if [ $# = 1 ] then if [[ $SIZE < "5" ]]; then echo "ISO $1 not mounted" exit 1 fi fi ISOFILE=$1 rc=0 rc=0 if [[ $# -ne 1 ]]; then echo echo "Use to create Bootable USB Flashdrive. Use as: $(basename $0) path_to_iso/isofile.iso" echo "$(basename $0) One parameter: path_to_isofile/distribution.iso" echo " You must be certain that the /dev/sd? is for a flashdrive]" echo exit 1 fi if [ ! -e $ISOFILE ];then echo "$ISOFILE does not exist!" ; exit 1; fi # -- iso file should end in dot iso -- if [[ $ISOFILE != *.iso ]];then echo "\"${ISOFILE}\" is not an *.iso file" >&2 exit 1 fi bs='bs=8M' echo "sudo dd of=$DEVICE if=$1 $bs status=progress oflag=direct,sync" yn="x" echo -e "\n\t\tThis ISO: $1" echo -e "\n\t\tTo overwrite this USB/flashdrive information?\n\t\t" sudo blkid $DEVICE* echo "" while [[ $yn == "x" ]] do echo -e "continue? y/n " read yn if [[ "x$yn" != "x" ]]; then if [ "$yn" == "n" ];then exit 0; fi if [ "$yn" == "N" ];then exit 0; fi if [ "$yn" == "y" ]; then break; fi if [ "$yn" == "Y" ]; then break; fi if [ "$yn" == "YES" || "$yn" == "yes" ]; then yn="Y" break; fi if [ "$yn" == "NO" || "$yn" == "no" ]; then exit 0; fi fi yn="x" done sudo dd if=$1 of=$DEVICE $bs status=progress oflag=direct,sync sync echo "eject $DEVICE" On Tuesday, April 28, 2020, 10:26:35 p.m. GMT-4, carl hansen wrote: On Tue, Apr 28, 2020 at 6:08 AM turgut kalfaoğlu wrote: > > I would like to suggest and in fact volunteer to create a conf file > option to 'dd'. > > It has dozens of hard to remember options, and there are some that I > would like to use all the time. > > For example, I am currently doing: > > $ sudo dd if=CentOS-6.10-x86_64-LiveDVD.iso of=/dev/sdc bs=4096 conv=fsync > > right now, and I have to lookup the conv=fsync option every time I want > to write to a USB drive. > > > Any thoughts? > > Thanks, > > -turgut suggestion, just create a file and make it executable that includes all your options echo sudo dd if=CentOS-6.10-x86_64-LiveDVD.iso of=/dev/sdc bs=4096 conv=fsync> $HOME/bin/ddforCent put $HOME/bin in your $PATH you could make several versions, with differing options ddforSomesituation, ddforforsomeothersitutation etc The last thing the world needs is another conf file, with its documentation mydd1.sh Description: application/shellscript
Re: Simpler name for --no-clobber option
Did you check the dictionary meaning of clobber? I am happy to use it, but clobber means to abuse physically. Merriam Webster dictionary Definition of clobber (Entry 2 of 2) transitive verb 1 : to pound mercilessly also : to hit with force clobber a home run 2a : to defeat overwhelmingly b : to have a strongly negative impact on businesses clobbered by the recession c : to criticize harshly clobber does not appear to non-abstractly match overwrite. Ignore my response. I go with the flow Regards Leslie Leslie Satenstein Montréal Québec, Canada On Wednesday, March 11, 2020, 11:39:08 a.m. GMT-4, Kamil Dudka wrote: On Wednesday, March 11, 2020 3:37:06 PM CET Leslie S Satenstein via GNU coreutils General Discussion wrote: > Just saw this message. for --no-clobber, would --no-replace > suffice? the latter could also be shortened to --nr. I am afraid that you are 11 years late to this discussion... --no-replace was proposed originally: https://lists.gnu.org/archive/html/bug-coreutils/2008-12/msg00157.html --no-clobber and --no-overwrite were suggested by the reviewers: https://lists.gnu.org/archive/html/bug-coreutils/2009-01/msg00053.html --no-clobber won in the end: https://lists.gnu.org/archive/html/bug-coreutils/2009-01/msg00063.html I do not think that the circumstances have changed so significantly since then to warrant a new option supported in parallel to the existing one. Kamil > Regards > Leslie > Leslie Satenstein > Montréal Québec, Canada > > > > On Wednesday, March 11, 2020, 10:32:19 a.m. GMT-4, Pádraig Brady > wrote: > On 11/03/2020 10:08, Tomas Zubiri wrote: > > Hello, > > I'm attaching a git patch for a small, easy improvement that would > > make cp easier and more pleasant to use and learn. > > > > cp overwrites files by default, this can be disabled by using the > > > > command line option --no-clobber, the proposal is merely to introduce > > an alias called --no-overwrites. > > > > Please let me know if somebody would be willing to merge this in > > principle so we can move address fine details like testing and the > > technical approach used. > > > For convenience, I'm pasting the patch below as well: > While the new name may be clearer > scripts using it would not be compat with older cp implementations. > Hence the incompatability introduced would not be worth it. > > thanks, > Pádraig
Re: Simpler name for --no-clobber option
Just saw this message. for --no-clobber, would --no-replace suffice? the latter could also be shortened to --nr. Regards Leslie Leslie Satenstein Montréal Québec, Canada On Wednesday, March 11, 2020, 10:32:19 a.m. GMT-4, Pádraig Brady wrote: On 11/03/2020 10:08, Tomas Zubiri wrote: > Hello, > I'm attaching a git patch for a small, easy improvement that would > make cp easier and more pleasant to use and learn. > > cp overwrites files by default, this can be disabled by using the > command line option --no-clobber, the proposal is merely to introduce > an alias called --no-overwrites. > > Please let me know if somebody would be willing to merge this in > principle so we can move address fine details like testing and the > technical approach used. > > For convenience, I'm pasting the patch below as well: While the new name may be clearer scripts using it would not be compat with older cp implementations. Hence the incompatability introduced would not be worth it. thanks, Pádraig
Re: Wishing rmdir had a prompt
rmdir -i Regards Leslie Leslie Satenstein Montréal Québec, Canada On Sunday, September 1, 2019, 7:38:28 p.m. GMT-4, Lady Aleena wrote: Hello. I would love to see a -i added to rmdir to prompt me before removals of empty directories like rm has. It would give me another moment to think "Do I really want to remove this?". This is just a wishful thought. Thank you for reading, Lady Aleena