I will not answer directly to your answer but will give you tools to help you figure out what is happening.
Before you go further, I suggest you to make a backup copy of your current
.bashrc file or (preferably) to perform the following in another directory than your
Comparison and experimentation
You can create a tar file (without compression) of a text file and perform a
cat on it. You will see some interesting information at the first line : compare it to your
If you extract a non-tar file (e.g.
.bashrc) here is what you will get:
$ tar xvf .bashrc
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
As you said that extracting the
backup worked, without warning message nor error, it seems this file is a tar archive.
file will be your friend
Before any extraction, you could use the file command. It will indicate you the type of the file:
$ file backup.tar
backup.tar: POSIX tar archive (GNU)
$ file .bashrc
.bashrc: ASCII text
TAR : Tape ARchive
This sounds obvious but tar is a file format that was (and is still) used to create one single file from several other a complete directory. This allows using magnetic tape as a recording medium to save them.
Did you RTFM ?
As always, reading the manual pages of
file will help.
apropos command may also help, as it is a local search engine. As another example, here how you could use it (note the
" here which group the search keywords as a single parameter):
apropos "file type"
Finally (because I am a nice guy), here is an example of the content of a tar file containing a .bashrc file:
$ cat backup.tar | head
.bashrc0000644000175000017500000000711012770726533011656 0ustar myusermyuser# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in