cat command functionality:
1. create
2. view
3. join files
cat is short for catenate (to join things together, end-to-end)
- Create file
cat > file1
enter text
more text
# press Enter, CTRL-d to exit
- View file(s)
cat -n filename # will number all lines
cat -b filename # will number all non-blank lines
cat -t filename # all tabs to be shown as ^I
cat -s filename # remove extra blank lines. 1 blank line is allowed.
cat -A filename # combine -t & -s options together
- Join Files
cat test1 test2 # join both files and show output in stdout
cat test1 test2 > test # Join both files and add to stdout
Showing posts with label create file. Show all posts
Showing posts with label create file. Show all posts
Saturday, October 29, 2011
Usage of cat command
Labels:
catenate,
create file,
join files in linux,
linux command,
view file
Subscribe to:
Posts (Atom)