| Noob question I'm trying to understand redirection and clobbering within this:
[julius@station julius]$ touch file1
[julius@station julius]$ ls
file1
[julius@station julius]$ ls > file2
[julius@station julius]$ ls
file1 file2
[julius@station julius]$ cat file2
file1 file2
When the command "ls > file2" is used, I'm assuming:
This copies the contents of file1 in to file2, although file2 retains its name, while also preserving the original copy file1. Is this correct?
Also, I'm confused as how either file1 or file2 are showing following "cat file2".
Thanks,
Chris |