New answers tagged

0

Thanks to @DanielBeck for his detailed answer. Here is a very quick and dirty solution, useful to quickly check the label of some file on ssh: #!/bin/bash color_08=$'\e[44;30m' #blue color_02=$'\e[47;30m' #gray color_04=$'\e[42;30m' #green color_0E=$'\e[46;30m' #orange/cyan color_06=$'\e[45;30m' #purple color_0C=$'\e[41;30m' #red color_0A=$'\e[43;30m' ...


0

Actually, the official docs contains all answers: 256-color mode requirements and limitations cygwin and ANSI cygwin/msys connector Why not to read them? To enable 256 colors in ls you have to run cygwin/msys connector and disable backscroll buffer with -cur_console:h0 while starting your task. Of course, that must not be {cmd} task, but {bash} task ...


0

The answer is in the ls man page. --show-control-chars show non graphic characters as-is (default unless program is 'ls' and output is a terminal) I'd have to look into it further to figure out why ls is treated specially, but that argument will display 💋 when using ls.


0

I'm going to answer my own question. After more research I have found a way to get what I want. Although not the exact order in which I initially wanted in the question, I have found a way to do this with the order: All dirs including hidden, then all dot files then all regualr files. With this in .bashrc: alias d='LC_COLLATE=C ls -la ...


1

I got it working with ls -1b | sed s/\.mp3//


0

ls -1 | cut -d "." -f 1 cuts off the first period and everything after it. It treats periods as a separator and shows only text in the first field, before any occurrence of the separator. If your filenames have only one extension at most (zero or one periods, total), this may work (just that simple). ls -1b | cut -d "." -f 1 replaces the spaces with "\ ...


0

The simplest answer is to split it into two commands: this is best done in a script (such as lssort), but if you want ls always to work this way you can alias ls=lssort:- ls -d --group-directories-first "$@"/.* ls -d --group-directories-first "$@"/* This assumes that a single directory name (which may contain spaces) is given and that it is the last ...



Top 50 recent answers are included