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 programming languages
  1. A device file to represent that the current file system is full

  2. A device file to test scenarios of testing a /dev/full

  3. Invalid device

  4. None

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

The /dev/full device file simulates a full device scenario - it always returns ENOSPC (no space left) error on write attempts, allowing testing of how applications handle disk-full conditions without actually filling storage.

Multiple choice technology operating systems
  1. Every one can read, group can execute only and the owner can read and write

  2. Every one can read and write, but owner alone can execute

  3. Every one can read, group including owner can write, owner alone can execute

  4. None

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

Unix permission 764 in octal represents owner having rwx (7=4+2+1), group having rw- (6=4+2), and others having r-- (4). This means everyone can read, both owner and group can write, but only the owner can execute. The binary breakdown is 111 110 100.

Multiple choice technology operating systems
  1. sort -d

  2. sort

  3. sort -r

  4. sort -R

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

The sort -r command in Unix sorts lines in reverse (descending) order. The -r flag stands for reverse sorting. Without -r, sort sorts in ascending order by default. Option D (sort -R) does a random sort, not descending.

Multiple choice technology operating systems
  1. gunzip/expand

  2. gzip

  3. zip

  4. winzip

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

The gunzip command decompresses files compressed with gzip (.gz extension), and expand decompresses files compressed with the compress utility (.Z extension). These are the standard Unix tools for uncompressing files. gzip and zip are compression tools, while winzip is a Windows-specific program.

Multiple choice technology operating systems
  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

tar -cvf creates an archive (create, verbose, file), while tar -xvf extracts (extract, verbose, file). The syntax requires naming the .tar archive file explicitly before listing files to add. Options A and B show incorrect syntax - they reference 'file' inconsistently and omit the .tar extension or use forward slashes incorrectly.

Multiple choice technology operating systems
  1. fsck

  2. fsmount

  3. mount

  4. mountfs

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

The mount command is used to attach a filesystem to a directory tree, making it accessible. fsck is for filesystem checking, fsmount and mountfs are not standard Linux commands.

Multiple choice technology operating systems
  1. executable, text, documents, directories

  2. directories, scripts, executables, normal files

  3. Normal files, special files, hidden files, device files

  4. ordinary files, directories, symbolic links, block and character device files

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

Linux has four fundamental file types: ordinary files (regular data), directories (folders), symbolic links (pointers to other files), and device files (block and character special files for hardware devices). The other options mix concepts incorrectly or omit special files.

Multiple choice technology mainframe
  1. SQL Process Used File Input.

  2. SQL Processing Using Format Input

  3. SQL Processing Using File Input

  4. SQL Processing Using File Information.

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

SPUFI (SQL Processing Using File Input) is an IBM DB2 tool that allows users to execute SQL statements by providing them in an input file. It's a mainframe DB2 utility for running SQL queries from file input rather than interactive input.

Multiple choice technology databases
  1. LOAD

  2. UNLOAD

  3. REORG

  4. RUNSTATS

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

To answer this question, the user needs to have an understanding of database management and utilities used to manipulate data in a database.

The utility used to retrieve data from an Image copy is the UNLOAD utility. This utility is used to extract data from a table or set of tables and write it to an output data set. The output data set can then be used to restore the data to a database using the LOAD utility.

Option A, LOAD, is incorrect because it is used to load data into a database from an input data set. It is the opposite of the UNLOAD utility.

Option C, REORG, is incorrect because it is used to reorganize a table or set of tables in a database, not to retrieve data from an Image copy.

Option D, RUNSTATS, is incorrect because it is used to collect statistics about the data in a table or set of tables. It is not used to retrieve data from an Image copy.

Therefore, the correct answer is:

The Answer is: B. UNLOAD

Multiple choice technology databases
  1. True

  2. False

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

MERGECOPY is a DB2 utility that combines multiple incremental image copies into a single full image copy. This is useful for reducing recovery time by creating a consolidated full copy from a series of incremental copies taken over time. The statement accurately describes MERGECOPY's purpose.

Multiple choice technology programming languages
  1. lseek(), open(), write(), close()

  2. open(), write(), lseek(), close()

  3. open(), lseek(), open(), , write() close()

  4. None

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

To perform file operations, a file must first be opened using open(). Once open, you can write data to it using write(), reposition the file offset using lseek(), and finally release the file descriptor using close().

Multiple choice technology programming languages
  1. Its not possible

  2. use isused() function

  3. Try to open file with locking enabled

  4. Try to write the file after opening

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

To detect if a file is already open by another process, the standard approach is to attempt opening it with file locking enabled. If the lock fails, another process likely has it open. Options A, B, and D are incorrect - there's no standard isused() function, and writing after opening doesn't detect existing locks.

Multiple choice technology programming languages
  1. Use filelock()

  2. use lockfile()

  3. Use lockfd()

  4. use fcntl()

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

File locking in Unix/Linux is typically done using fcntl() system call with F_SETLK or F_SETLCK commands. Options A, B, and C refer to non-standard functions. The fcntl() system call is the POSIX-standard method for advisory file locking.