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 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 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.

Multiple choice technology programming languages
  1. The process file name of init

  2. The proc file name of RAM

  3. Invalid file

  4. The core dump file

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

/proc/kcore is a file in the /proc filesystem that represents the system's physical RAM in core dump format. It provides a virtual view of the entire system memory, similar to how a core dump captures process memory. Options A and D are incorrect because /proc/kcore is not related to the init process or individual program core dumps.

Multiple choice technology programming languages
  1. Resolve by update PATH variable

  2. Resolve by setting SHELLPATH variable

  3. Resolve by updating LD_LIBRARY_PATH

  4. Resolve by setting LIBRARY_PATH variable

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

The error indicates the dynamic linker cannot find a required shared library at runtime. The LD_LIBRARY_PATH environment variable tells the dynamic linker where to search for shared libraries beyond the default paths. Options A, B, and D are incorrect: PATH is for executables, SHELLPATH doesn't exist for this purpose, and LIBRARY_PATH is used at compile time, not runtime.

Multiple choice technology programming languages
  1. A core file is created when a program terminates unexpectedly, due to a bug,

  2. A core represents the RAM memory (core)

  3. core file contains the entire process information

  4. A text file

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

A core file is generated when a program crashes abnormally due to signals like SIGSEGV, SIGABRT, or SIGBUS. It contains the process's memory image at the time of the crash for debugging purposes. Option B is incorrect because /proc/kcore represents RAM, not individual core files. Option C is too broad and option D is simply wrong.