Computer Knowledge
Computer File Systems
1,516 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
The -s file test operator returns true if the file exists AND has a size greater than zero. This combines both existence and non-empty checks. The -l operator tests for symbolic links, -S for sockets, and -k for the sticky bit.
-
With the #include preprocessor command
-
Adding the file’s directory to @INC and then passing the filename to require.
-
Both A & B
-
None
-
nameas
-
rename
-
name
-
now_known_as
B
Correct answer
Explanation
The built-in rename function in Perl is used to change a file's name or move it across directories. Other options like nameas, name, and now_known_as do not exist in Perl's standard function library, making them incorrect distractors.
B
Correct answer
Explanation
The stat function in Perl returns a 13-element list giving status information about a file, including its owner UID, group GID, and change time (ctime).
D
Correct answer
Explanation
In Perl, file test operator -k checks if the sticky bit is set on a file. The -s operator tests for non-zero file size, -l tests for symbolic link, and -S tests for socket file. Sticky bit is a permission bit that restricts deletion to the file owner even on writable directories.
B
Correct answer
Explanation
In Perl, file test operator -l checks if a file is a symbolic link. The -s operator tests for non-zero file size, -S tests for socket file, and -k tests for sticky bit. Symbolic links are references to other files in the filesystem.
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.