Tag Info

New answers tagged

1

Sorting the output by creation time is impossible in Linux (ctime is not file creation date). stat has the ability to show a file's birth time using the %w and %W format tags, but they always show - and 0, respectively, even on filesystems that store creation time/birth time. Hence, it is practically useless for this purpose on Linux. The other two sorting ...


2

Use the following command to view colored dmesg output in less: dmesg --color=always | less -R Many utilities which produce colored output (ls, grep, etc) have the same option.


0

You can't. EOF is not piped to the next command when a connection ends. See this other answer


1

You can use pipe output as a shell script argument. Try this method: cat text.txt | xargs -I {} ./Myscript.sh {}


0

You could also come across a command line length limitation. Part of the reason for using xargs is that it splits up the input into safe command-line-sized chunks. So, imagine a situation in which you have hundreds of thousands of .txt files in the directory. ls *.txt will fail. You would need to do ls | grep .txt$ |xargs cat > ...



Top 50 recent answers are included