October 19th, 2010, 11:49 PM
I haven't seen the copying i need
i've spent 3 hours on google trying to find the answer to this. i have a directory full of .txt files and files that got misextentioned, but are supposed to be .txt files. i want to combine all of them into one big .txt file. cat *.* bigfile.txt doesn't work, because *.* isn't a file or directory, so how do i tell it all? if * isn't all then how the eff do i say it??
October 20th, 2010, 12:08 AM
Works under bash
cat * > bigfile.txt
October 20th, 2010, 12:13 AM
A single asterisk ("*") is a glob which means it matches all files in the current directory
I think your error is in the call to cat:
would append the content of all files and "bigfile.txt" and output it to the terminal (standard output). If you want to instead store that output, you need to use output redirection, using the ">" operator:
$ cat * bigfile.txt
(In each of these examples, "$" is your shell prompt.)
$cat * > bigfile.txt
Last edited by codergeek42; October 20th, 2010 at 12:49 AM.
October 20th, 2010, 12:26 AM
yes i see my error now thank you now it's compiling them i appreciate the help. first i wasn't putting in the > before the target. then i was using the *.* instead of * i'm so used to winblows terminal that it's hard to switch over
November 22nd, 2010, 06:57 PM
"*.*" doesn't work in Linux because Linux does not require that files have extensions. It doesn't even have any concept of them at the OS level (but some programs can might pay attention to them).