Join (merge / concatenate) split files: Windows or Linux

Sometimes you have to join two files together. There are plenty of tools for file spitting and joining (restoring), but I prefer the build in ones.

Use copy command under Windows:
copy /B file1.ext + file2.ext result_file.ext
“B” stands for binary file

Use cat command under Linux:
cat file1.ext file2.ext > result_file.ext

Here are two example files shown in hexadecimal and ascii:

file1.ext
00000000 31 31 31 20 61 62 63 0D   111 abc.
00000008 0A 0D 0A                  ...

file2.ext
00000000 53 65 63 6F 6E 64 20 66   Second f
00000008 69 6C 65 0D 0A            ile..

after concatenation result_file.ext contains contents of both files
00000000 31 31 31 20 61 62 63 0D   111 abc.
00000008 0A 0D 0A 53 65 63 6F 6E   ...Secon
00000010 64 20 66 69 6C 65 0D 0A   d file..

My Linux command quick reference

My day-to-day job does not involve Linux, so I made a command reference for me. Some useful nix commands:

list directory contents
ls
list directory contents wish permissions, dates, size, etc.
ls -l
print (name of) working directory
pwd
text editor
nano
copy file
cp
copy directory
cp -r
move or rename file or directory
mv
create directory
mkdir
delete file or directory
rm
delete non-empty directory
rm -r dir_nameorrm -ir dir_name [confirm everything]
process list
top
free space on all hdd
df -h
attributes
1. Owner
2. Group
3. World

permissions
0 --- no permissions
1 --x execute
2 -w- write
3 -wx write, execute (1+2)
4 r-- read
5 r-x read, execute (4+1)
6 rw- read, write (4+2)
7 rwx read, write, execute (4+2+1)

permission examples
chmod 700 some_file - you read, write, execute
chmod 777 some_file - everyone read, write, execute
chmod 744 some_file - you read, write, execute; everyone read
chmod 444 some_file - you read, everyone else

show (type) file in console
cat fileorcat file1 file2
if file is very long
cat file | moreorcat file | lessorless file
show last part of file
tail file
show first part of file
head file

Windows tracert
traceroute

Show the full path of (shell) command
which command

To locate the binary, source, and manual page files for a command
whereis command

To gzip output
cat somefile | gzip -9 > filename.gz

To archive directory to TAR
tar cf archive_name.tar directory/to/archive/

To archive directory to tar.gz
tar czf archive_name.tar.gz directory/to/archive/

To archive directory to tar.bz2
tar cjf archive_name.tar.bz2 directory/to/archive/

Real men don't make backups