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 security
  1. an ASCII file that contains an entry for each user

  2. File which is created and maintained by a server of activity performed by it

  3. short python program that prints the list of all files inside the current directory

  4. File which is created and maintained by the operating system

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

A log file is a file automatically created and maintained by a server or application that records events, transactions, and activities performed by it for auditing and troubleshooting.

Multiple choice technology programming languages
  1. a) Use filelock()

  2. b) use lockfile()

  3. c) Use lockfd()

  4. d) use fcntl()

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

fcntl() is the POSIX system call used for advisory and mandatory file locking in Unix/Linux systems. It operates on file descriptors and provides mechanisms like shared and exclusive locks through the F_SETLK and F_SETLKW commands. The other options (filelock(), lockfile(), lockfd()) are not standard POSIX system calls.

Multiple choice technology programming languages
  1. a) duplicate()

  2. b) dup()

  3. c) cp()

  4. d) mknod()

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

dup() is the POSIX system call used to duplicate file descriptors. It creates a new file descriptor that refers to the same open file description as the original, sharing the file offset and status flags. dup2() is a related call that allows specifying the descriptor number. cp() is for file copying, mknod() creates device nodes.

Multiple choice technology mainframe
  1. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE LAST = 1

  2. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE LAST(1)

  3. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE TRAILER

  4. All of the above

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

Both B and C are correct methods to remove the last record from an input file. Option B uses REMOVE LAST(1) which explicitly removes the last 1 record. Option C uses REMOVE TRAILER which removes trailer records - if the last record is a trailer, this achieves the same result. Both syntaxes are valid in mainframe sort utilities like Easytrieve. Option A is incorrect because REMOVE LAST = 1 has incorrect syntax (should use parentheses, not equals).

Multiple choice technology mainframe
  1. OUTREC

  2. INREC

  3. OUTFIL

  4. None of the above

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

OUTFIL is the JCL statement used to create multiple output files from a single input file based on different conditions. It allows you to specify different INCLUDE/OMIT criteria and formatting for each output dataset. OUTREC and INREC are used for record formatting but not for creating multiple output files. OUTFIL can split data into different files using various selection criteria.

Multiple choice technology operating systems
  1. list the files

  2. check the process status

  3. substitute one word with another

  4. copy the contents of one file to another

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

sed (stream editor) is primarily used for text transformation and substitution. It can search for patterns and replace them with specified text using commands like s/old/new/ to substitute one word or phrase with another.

Multiple choice technology operating systems
  1. touch

  2. vi

  3. cat

  4. a&b

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

Both touch and vi can create files. touch creates an empty file immediately, while vi opens the text editor and creates the file when you save. Since both A and B are valid methods, D (a&b) is correct.

Multiple choice technology operating systems
  1. checks for the existence of a file

  2. checks for existence of a directory

  3. checks for read permission on a file

  4. checks for write permission on a file

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

The -f test operator checks whether a file exists AND is a regular file (not a directory or device). In shell scripting, [ -f filename ] returns true only if the specified path is an existing regular file.

Multiple choice technology web technology
  1. *.idx and *.bat

  2. *.idx and *.dat

  3. *.che and *.txt

  4. *.dat and *.err

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

Informatica cache files consist of index files with the .idx extension and data files with the .dat extension.

Multiple choice technology web technology
  1. *.idx and *.bat

  2. *.idx and *.dat

  3. *.che and *.txt

  4. *.dat and *.err

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

Informatica cache files are created in the cache directory and consist of index files with the .idx extension and data files with the .dat extension.

Multiple choice technology testing
  1. .TSR and .QRS

  2. .QRS and .MTR

  3. .TSR and .MTR

  4. .MTR and .QFL

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

To solve this question, the user needs to have knowledge about automated testing tools and file extensions used in them.

The correct option is:

C. .TSR and .MTR

Explanation:

In automated testing tools like UFT (Unified Functional Testing), shared object repository and local object repository are used to store object information.

  • Shared Object Repository (SOR) file stores information about the objects that are common for multiple tests. The file extension of the Shared Object Repository file is .TSR (Test Shared Repository).

  • Local Object Repository (LOR) file stores information about the objects that are specific to a particular test. The file extension of the Local Object Repository file is .MTR (Mercury Test Results).

Therefore, the correct answer is option C, .TSR and .MTR.

Multiple choice technology programming languages
  1. gunzip/expand

  2. gzip

  3. zip

  4. winzip

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

gunzip is the standard command to uncompress .gz files, and expand uncompresses files created with the compress command. gzip is for compression (not decompression), zip creates .zip archives, and winzip is not a Unix tool.

Multiple choice technology programming languages
  1. tar -cvf file/tar -xvf file

  2. tar -xvf file /tar -cvf file

  3. tar -cvf file.tar <file>/tar -xvf file.tar <file>/

  4. tar -xvf file.tar <file>/tar -cvf file.tar <file>/

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

To create a tar archive, the syntax is tar -cvf archive.tar. To extract (untar) it, the syntax is tar -xvf archive.tar. Option 510833 correctly represents this pair of commands.