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

Multiple choice technology operating systems
  1. type filename

  2. file filename

  3. desc filename

  4. .filename

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The 'file' command examines file contents to determine and report the file type, unlike simple extensions. It works by analyzing magic numbers and file headers. Options A, C, and D are not valid Unix commands for file type detection.

Multiple choice technology operating systems
  1. ls -lrt file1

  2. ls -lR file1

  3. find . -s file1

  4. find . -name file1

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The find command is used to search directories recursively. The -name option specifies the filename pattern to search for, making find . -name file1 correct. ls commands list files but do not perform recursive file-matching searches, and find . -s is invalid syntax for this purpose.

Multiple choice technology operating systems
  1. if the output of “cmp -s file1 file2” is not zero

  2. if the output of “cmp -s file1 file2” is zero

  3. if the output of “cmp -s file1 file2” is one

  4. if the output of “cmp -diff file1 file2” is zero

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The cmp utility compares two files byte-by-byte. The -s option runs it silently, returning an exit status of 0 if the files are identical, and 1 if they differ. Other options like -diff are invalid, and a non-zero or 1 exit status indicates differences or errors.

Multiple choice technology operating systems
  1. &> filename

  2. 1> filename

  3. 2> /dev/null

  4. 2> filename

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In shell redirection, file descriptor 2 represents stderr (standard error), so 2> filename redirects error messages to the specified file. Option A's &> redirects both stdout and stderr together, while option B's 1> only redirects stdout. Option C redirects errors to /dev/null, discarding them rather than saving to a file.

Multiple choice technology
  1. File and Data Sets preserve partitioning.

  2. File and Data Sets are stored in internal format.

  3. File and Data Sets contain header file and data files.

  4. File and Data Sets are readable by external applications.

Reveal answer Fill a bubble to check yourself
A,C Correct answer
Explanation

Both File Sets and Data Sets preserve partitioning metadata and consist of a header file plus data files. However, File Sets are readable by external applications (text format), while Data Sets use internal DataStage format and are not externally readable. Option B incorrectly states both are internal.

Multiple choice technology
  1. File sets are partitioned.

  2. File sets are unpartitioned.

  3. File sets are stored as a single file.

  4. File sets are readable by external applications.

  5. File sets are stored as header file and data files.

Reveal answer Fill a bubble to check yourself
A,D,E Correct answer
Explanation

File Sets are partitioned (A), stored as a header file plus separate data files (E), and are readable by external applications since they use text format (D). They are not unpartitioned (B is wrong) and not stored as a single file (C is wrong).

Multiple choice technology operating systems
  1. search a pattern

  2. grape juice

  3. grip a file

  4. compress a file

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The grep command is used to search for patterns (text strings, regular expressions) within files or input streams. It's one of the most fundamental UNIX text processing tools. The other options are incorrect - grep is not related to grape juice, gripping files, or compression.

Multiple choice technology
  1. in + out

  2. write + read

  3. in + write

  4. read + out

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

An intermediate file in Ab Initio needs to receive data from upstream components and pass it to downstream components. Therefore, it requires a write port to receive data and a read port to provide data to subsequent components in the pipeline.

Multiple choice technology
  1. Controls the data partitions

  2. Control the control partition

  3. Control entire multi-file system

  4. It's just another file

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

In Ab Initio's multi-file system (MFS), the control file manages metadata about data partitions - how files are split across partitions. It doesn't control the entire system or just another data file; it specifically handles partition control.

Multiple choice technology
  1. Partition-by-key and sort

  2. Not possible

  3. Gather

  4. Reformat

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To convert from 4-way to 8-way MFS, you need to redistribute data. Partition-by-key with sort can repartition data into 8 partitions. Gather would only collect, Reformat changes structure but not partitioning.

Multiple choice technology operating systems
  1. ls ?3[rgi]*

  2. ls [rgi]

  3. ls ??[rgi]*

  4. ls **[rgi]?

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

To answer this question, the user needs to know the basics of using wildcard characters in Linux. Wildcards are used to represent one or more characters in a filename or directory. In this case, we are looking for files that have an "r", "g", or "i" on the third place of their filename.

Now, let's go through each option and explain why it is right or wrong:

A. ls ?3[rgi]*: This option is incorrect because "?3" means to match any single character in the third position, and then we are looking for either "r", "g", or "i" as the next character. This would only match files that have a single character in the third position and then either "r", "g", or "i".

B. ls [rgi]: This option is incorrect because it would match any file that has "r", "g", or "i" anywhere in its filename. This would include files that have these characters on the third place as well as those that don't.

C. ls ??[rgi]*: This option is correct. The "??" matches any two characters in the filename, followed by either "r", "g", or "i", and then any number of other characters. This would match any file that has two characters before "r", "g", or "i" on the third place.

D. ls [rgi]?: This option is incorrect because "" means to match any number of directories recursively, and "[rgi]?" means to match any file that ends with either "r", "g", or "i", followed by any one character. This would match files that end with "r", "g", or "i", not those that have these characters on the third place.

Therefore, the correct answer is:

The Answer is: C. ls ??[rgi]*