Computer Knowledge
Computer File Systems
1,249 Questions
Computer file systems dictate how data is stored, organized, and retrieved on storage devices. Important concepts include file allocation tables, access mechanisms, and various formats like sequential and video files. Candidates preparing for banking and government exams should practice these fundamentals thoroughly.
File access mechanismsVideo and password filesFile extensionsFile allocation tableSystem metadata
Computer File Systems Questions
A
Correct answer
Explanation
In Perl, file test operator -s checks if a file exists AND has a non-zero size (it returns the file size in bytes if true). The -l operator tests for symbolic link, -S tests for socket file, and -k tests for sticky bit. This is useful when you need to verify a file has content before processing it.
-
HFS files
-
QSAM files
-
VSAM files
-
None of the above
A,B,C
Correct answer
Explanation
INSYNC is a versatile mainframe data management tool capable of reading and writing multiple file systems, including Hierarchical File System (HFS), Queued Sequential Access Method (QSAM), and Virtual Storage Access Method (VSAM) files. "None of the above" is incorrect because all three listed file formats are fully supported.
-
file
-
system
-
directory
-
None of these
C
Correct answer
Explanation
UDDI is a directory service for storing information about web services. Like a phone directory, it allows businesses to publish and discover web services. It's not a single file or an entire system - it's a structured directory of service descriptions.
-
The file will be created and will be opened for reading and writing
-
The open fails and error occurs
-
File will be created and opened for writing only
-
The file will be created and opened for reading only
B
Correct answer
Explanation
In COBOL, opening a non-existent file in I-O (Input-Output) mode causes the open operation to fail, resulting in a file status error (typically 35). Unlike OUTPUT or EXTEND modes, I-O mode requires the file to already exist, so it will not automatically create the file.
-
created
-
updated
-
deleted
-
modified
B
Correct answer
Explanation
RSS feeds are designed to be automatically updated as content changes on the source website. When new content is published, the RSS feed file is regenerated to include the latest items, allowing feed readers and aggregators to detect and display updates without manual intervention. The primary purpose of RSS is automated content distribution and notification of updates.
-
The date output is redirected to the file.
-
The date output is redirected and appended to the end of the file.
-
The date output is redirected and appended to the beginning of the file.
-
None of the above
B
Correct answer
Explanation
The '>>' operator redirects stdout to a file and appends to the end rather than overwriting. 'date >> file' executes the date command and adds its output to the file's end. If the file doesn't exist, it will be created. The '>' operator alone would overwrite the file contents.
-
The date output is redirected to the file.
-
The date output is redirected and appended to the end of the file.
-
The date output is redirected and appended to the beginning of the file.
-
None of the above
B
Correct answer
Explanation
The >> operator in shell redirects output and appends it to the end of the specified file. If the file doesn't exist, it will be created. The > operator would overwrite the file instead of appending. Appending always happens at the end of the file, not the beginning.
-
EXTEND
-
OUTPUT
-
I-O
-
INPUT
-
None of the above
E
Correct answer
Explanation
All listed COBOL file open modes are valid: EXTEND adds records to existing file, OUTPUT creates new or replaces, I-O allows input-output operations, and INPUT reads from file. None of these modes inherently throws an error - they are standard file operation modes.
-
Recording mode - F
-
Recording mode - V
-
Recording mode - U
-
Recording mode - S
-
No default mode for QSAM
A
Correct answer
Explanation
QSAM defaults to Fixed (F) recording mode, meaning records have a fixed length. The other options (V, U, S) refer to variable, undefined, or sequential modes that are not the default for QSAM, so they are incorrect.
-
FILE SECTION
-
REPORT-SECTION
-
SCREEN-SECTION
-
STORAGE-SECTION
D
Correct answer
Explanation
COBOL Data Division contains FILE SECTION for file descriptions, WORKING-STORAGE SECTION for working data, LINKAGE SECTION for parameter passing, REPORT SECTION for report writer, and SCREEN SECTION for screen handling. STORAGE-SECTION is not a valid section name - this appears to be a malformed reference to WORKING-STORAGE SECTION.
B
Correct answer
Explanation
In COBOL, the MERGE verb combines two or more sorted sequential files into a single sorted output file based on specified keys. MER is not a valid verb, COMBINE doesn't exist in COBOL, and JOIN is used for database operations not file merging.
-
Deletes all from first line to last line
-
Delete all characters .ZF and .ZL
-
Error occurs
-
Does nothing
A
Correct answer
Explanation
The ISPF :DELETE ALL primary command with label range .ZF (first line) to .ZL (last line) deletes all lines in that range. .ZF and .ZL are built-in ISPF labels representing file boundaries. This effectively deletes the entire file contents, not the labels themselves.
-
Executes the script
-
Changes the time stamp of existing file
-
Creates a file of 0 byte.
-
b and c
-
All of the above
D
Correct answer
Explanation
The 'touch' command in Unix/Linux performs two functions: 1) If the file doesn't exist, it creates an empty file (0 bytes). 2) If the file already exists, it updates the file's timestamp to the current time. Therefore, option D 'b and c' is correct because touch does both of these things depending on whether the file exists.
A
Correct answer
Explanation
The 'file' command determines a file's type by examining its contents (magic numbers and header bytes), not just the extension. It outputs descriptions like 'ASCII text', 'ELF executable', 'JPEG image', etc. The 'type' command is a shell builtin for displaying command types, 'which' locates commands, and 'grep' searches for text patterns.
B
Correct answer
Explanation
Perl programs need execute permission to run directly. The 755 octal notation means: owner can read, write, execute (7); group can read and execute (5); others can read and execute (5). This is the standard permission for executable scripts, while 666 only allows read/write with no execute capability.