3
What does it mean when a file is in red. I change into one of my directories and run ls and it shows these files I've never seen in red. duplicity-full.20120405T013825Z.vol10.difftar.gz and goes all the way to vol 20. What does this mean?
3
What does it mean when a file is in red. I change into one of my directories and run ls and it shows these files I've never seen in red. duplicity-full.20120405T013825Z.vol10.difftar.gz and goes all the way to vol 20. What does this mean?
1
Red means the file is compressed. The .gz extension means it was gzipped.
It means more than that, especially if the OP didn't use the Duplicity tool to create these backups (that's what these archives are. See my answer for more info. – AStopher – 2014-05-30T18:21:18.770
0
A *.gz file is an archive, and I assume that you're accessing via terminal (there's no info to suggest that you're accessing via GUI).
Files highlighed in red in the terminal are archives, and are normally used by some applications to back-up their content.
Looking at the file names, they seem to be backups of your hard disk. If you never intended to use Duplicity, then I strongly advise you to run a full virus/malware/spyware scan on your system, and to take your system offline while doing so. If possible, have a look at your network logs to see if these files are being sent out; if so, this means that hackers are stealing your data.
Also, your example file seems to have been created on 4th May 2012 (or 5th April 2012, if you're European), so they're extremely old (by the standards of backups). Ask anyone else who had access to the system on this date if they know anything about this.
Reason for the downvote? – AStopher – 2014-06-19T08:56:07.737
Worth noting that .gz
is simply a file extension, which means absolutely nothing. The file contents may not actually be an archive. This answer ignores file magic numbers and filetype recognition entirely. – Parthian Shot – 2020-02-15T02:46:29.070
0
What it probably means is that ls
is aliased to ls --color=auto
or ls --color=always
.
To check whether this is the case, you can run command ls
, or /bin/ls, to get around the aliasing (and, if I'm right, it should print without special colors).
That being said, one of the ways you can figure out what the color means is through the documentation for ls
, and by running dircolors
. Or you can simply run file
on the file to see what kind of thing your computer thinks the file is (IIRC, ls
uses file
to determine how it should colorize).
Incidentally, coloring can change based on terminal, platform, and shell, but red usually means either that the file is an archive, or that it is an executable.
Hope that helps.
1Wrong answer... – AStopher – 2014-05-30T19:36:33.070
@zyboxenterprises In what way? By default, ls does not colorize, so if he's seeing something in red it must be configured by one of the setup scripts in his terminal. – Parthian Shot – 2014-05-30T19:50:22.217
@zyboxenterprises Futhermore, your answer assumed a ridiculous amount- for one thing, file extensions in *nix O/Ses don't have to have anything to do with file type; magic numbers are the primary way filetypes are identified by the system. For another, executables are always red by default in LS_COLORS, not just archives. I'll grant the Duplicity information is helpful, but my information is also accurate and relevant; the fact that you feel your answer is more relevant has no bearing on whether or not mine is also. – Parthian Shot – 2014-05-30T20:01:09.177
Only the second from last sentence is really reliant here, OP didn't ask for an explanation of ls
color schemes. – AStopher – 2014-05-30T20:05:40.457
@zyboxenterprises The question he asked was specifically why is this thing red
, not what does its being red indicate about the file
, although, on both counts, my answer was a valid response. It is red because ls
made it red, not because the filename contained control characters. And ls
made it red because ls
was given an option under-the-hood. And that option colorizes based on file type, not permissions or something else entirely. And the specific way it (and you) can determine the underlying file type that causes this coloration is by doing the things I mentioned. – Parthian Shot – 2014-05-30T20:12:04.297
Voting answers down because you don't agree with what the answerer says to you isn't good practice. – AStopher – 2014-05-31T10:21:59.740
Despite the fact that I thought your answer was below-par, it did have a useful nugget of information and I thought it was at least trying to be helpful, so I didn't vote it down. I am frustrated with you, but the voting system exists to help the larger community, so, luckily for you, I won't subvert it. – Parthian Shot – 2014-06-02T13:28:29.577
Try "man ls" to see what ls output means. – mpez0 – 2014-05-30T20:14:07.057