702-100 practice question 5 of 15
A file called mybackup is found while investigating a USB pen drive. Which utility can be used to determine the kind of data that is contained in that file?
Full set: 60 questionsThe file command is the standard Linux utility designed to determine the type of a file. It operates by performing a series of tests on the file's content. The primary test involves checking the file's header for "magic numbers," which are unique byte sequences that identify specific file formats (e.g., an ELF executable, a JPEG image, or a gzip compressed archive). This allows an investigator to identify the nature of the data within the mybackup file, regardless of its name or extension, which directly addresses the question's objective.
ls -l mybackup: This command lists file metadata such as permissions, size, and modification times, but does not inspect the file's content to determine its data type. tar -t mybackup: This command is specific to tar archives and lists their contents. It would fail or give an error if mybackup is not a tarball. whatis mybackup: This utility searches the manual page database for a command named mybackup, which is irrelevant for identifying the type of a user-created data file. touch mybackup: This command is used to update a file's access and modification timestamps or to create an empty file; it provides no information about the file's content. ---
1. file(1) - Linux man page: "This manual page documents version 5.41 of the file command. file tests each argument in an attempt to classify it. There are three sets of tests, performed in this order: filesystem tests, magic tests, and language tests. The first test that succeeds causes the file type to be printed."
Source: man file command output from a standard Linux distribution (e.g., Debian, Red Hat) or online man page repositories.
2. The GNU File Utilities Documentation: "The file command is a utility for determining the type of a file. It does this by examining the file's contents."
Source: GNU Coreutils manual, file invocation section.
3. MIT OpenCourseWare, 6.005 Software Construction, Fall 2016: In the context of command-line tools, the course material states: "The file command can tell you what kind of data is in a file."
Source: MIT OCW, 6.005, Fall 2016, Reading 19: Version Control. (This demonstrates the command's fundamental purpose in an academic context).
Keep practicing
Take the free 702-100 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 702-100 practice questions
- Question 1Which command can be used to display the local filesystems that are currently mounted'?
- Question 2Which line in a cron job runs myscript once per hour?
- Question 3Which FreeBSD command updates packages to newer versions'?
- Question 4Assuming a umask of 022, what are the default permissions in octal mode of the newly crea…
- Question 6Which of the following excerpts is a valid if condition in the Bourne shell?
- Question 7Which of the following lines in /etc/fstab mounts the device /dev/cd0a to /cdrom?
