saving xargs ouput from multi files to one file
0
votes
1
answer
57
views
I have these three text files :
#1.txt
hey stackoverflow
#2.txt
hey stackexchange
#3.txt
hello world
I am using this command to list the last 3 files in my dir and then cat
them and then save all the output from 3 files to one file (all.txt
)
Command :
ls -alth *txt | head -3 | xargs -n1 cat
How I can redirect the output to a file ??
Asked by Anonymous101
(3 rep)
Jan 17, 2024, 12:09 PM
Last activity: Jan 17, 2024, 01:16 PM
Last activity: Jan 17, 2024, 01:16 PM