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

Multiple choice technology programming languages
  1. -s

  2. -l

  3. -S

  4. -k

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. HFS files

  2. QSAM files

  3. VSAM files

  4. None of the above

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. The file will be created and will be opened for reading and writing

  2. The open fails and error occurs

  3. File will be created and opened for writing only

  4. The file will be created and opened for reading only

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology web technology
  1. created

  2. updated

  3. deleted

  4. modified

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology operating systems
  1. The date output is redirected to the file.

  2. The date output is redirected and appended to the end of the file.

  3. The date output is redirected and appended to the beginning of the file.

  4. None of the above

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology operating systems
  1. The date output is redirected to the file.

  2. The date output is redirected and appended to the end of the file.

  3. The date output is redirected and appended to the beginning of the file.

  4. None of the above

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. EXTEND

  2. OUTPUT

  3. I-O

  4. INPUT

  5. None of the above

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. Recording mode - F

  2. Recording mode - V

  3. Recording mode - U

  4. Recording mode - S

  5. No default mode for QSAM

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. FILE SECTION

  2. REPORT-SECTION

  3. SCREEN-SECTION

  4. STORAGE-SECTION

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology mainframe
  1. Deletes all from first line to last line

  2. Delete all characters .ZF and .ZL

  3. Error occurs

  4. Does nothing

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology operating systems
  1. Executes the script

  2. Changes the time stamp of existing file

  3. Creates a file of 0 byte.

  4. b and c

  5. All of the above

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology operating systems
  1. file

  2. type

  3. which

  4. grep

Reveal answer Fill a bubble to check yourself
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.

Multiple choice technology operating systems
  1. 666

  2. 755

  3. 766

  4. 777

Reveal answer Fill a bubble to check yourself
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.