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
-
Every one can read, group can execute only and the owner can read and write
-
Every one can read and write, but owner alone can execute
-
Every one can read, group including owner can write, owner alone can execute
-
None
C
Correct answer
Explanation
Permission 764 means: owner has 7 (rwx=read+write+execute), group has 6 (rw=read+write), others have 4 (r=read only). So everyone can read, group+owner can write, and only owner can execute.
-
vi -R <filename>
-
vi filename readonly
-
vi -r
-
Not possible
A
Correct answer
Explanation
The -R flag opens vi in read-only mode, preventing accidental modifications. Option B's 'readonly' is not a valid flag syntax, and option C's -r is for recovery mode after a crash. The 'view' command is equivalent to 'vi -R'.
-
Copies file1 to file2
-
Compares file1 and file2 and update file1 with file2 whereever differs
-
Compares file1 and file2 and update file2 with file1 whereever differs
-
None
D
Correct answer
Explanation
The cmp command compares two files byte-by-byte and reports the first location where they differ (with byte and line numbers). It performs read-only comparison and modifies neither file.
-
fsck
-
fsmount
-
mount
-
mountfs
C
Correct answer
Explanation
The mount command attaches a file system to a directory tree, making it accessible. fsck checks file system consistency, fsmount and mountfs are not standard Unix commands. mount is the fundamental utility for mounting file systems.
-
gunzip/expand
-
gzip
-
zip
-
winzip
A
Correct answer
Explanation
gunzip decompresses gzip archives (.gz files) and expand handles compressed files (.Z format). gzip is for compression, zip creates archives, and winzip doesn't exist on Unix systems. Both gunzip and expand are valid decompression tools.
-
tar -cvf file/tar -xvf file
-
tar -xvf file /tar -cvf file
-
tar -cvf file.tar <file>/tar -xvf file.tar <file>/
-
tar -xvf file.tar <file>/tar -cvf file.tar <file>/
C
Correct answer
Explanation
tar -cvf creates archives (c=create, v=verbose, f=file) and tar -xvf extracts them (x=extract). The correct syntax requires specifying the archive filename: tar -cvf archive.tar file(s) to create, tar -xvf archive.tar to extract. Option A and B reverse the create/extract order.
-
Every one can read, group can execute only and the owner can read and write
-
Every one can read and write, but owner alone can execute
-
Every one can read, group including owner can write, owner alone can execute
-
None
C
Correct answer
Explanation
Permission 764 in octal means: Owner (7) = read(4)+write(2)+execute(1), Group (6) = read(4)+write(2), Others (4) = read(4). So everyone can read, owner has full access, and group can read/write. Option C correctly states: everyone can read, group including owner can write, owner alone can execute.
-
sort -d
-
sort
-
sort -r
-
sort -R
C
Correct answer
Explanation
The sort -r command reverses the default ascending order to descending. Without -r, sort arranges lines from smallest to largest (alphabetically or numerically). The -r flag simply inverts this order arrangement.
B
Correct answer
Explanation
In r--r-xrwx, the middle three characters (r-x) represent group permissions. The first r-- is owner (user), and the last rwx is others. Group has read and execute but not write.
-
fsck
-
fsmount
-
mount
-
mountfs
C
Correct answer
Explanation
The mount command is used to attach file systems to the directory tree in Unix/Linux. fsck is for file system checking and repair, not mounting. fsmount and mountfs are not standard Unix/Linux commands.
-
cat *.txt -length=10
-
disp 10 .txt
-
head -10 *.txt
-
print 10 *.txt
C
Correct answer
Explanation
The head -10 command displays the first 10 lines of files. The *.txt glob pattern matches all files ending with .txt in the current directory. Combining them as head -10 *.txt correctly displays the first 10 lines of each .txt file. Options A, B, and D use nonexistent or incorrect command syntax.
-
ren FILE1 FILE2 - i
-
ren FILE1 FILE2
-
cp FILE1 FILE2
-
mv FILE1 FILE2
D
Correct answer
Explanation
In Unix/Linux, the 'mv' command both moves and renames files. 'mv FILE1 FILE2' renames FILE1 to FILE2 (or moves it to FILE2). 'ren' is a DOS/Windows command, not Unix. 'cp' copies files rather than renaming them. The '-i' flag (for interactive prompting) is not required for basic renaming.
-
(.TSR and .QRS)
-
(.QRS and .MTR)
-
(.TSR and .MTR)
-
(.MTR and .QFL)
C
Correct answer
Explanation
In QTP (QuickTest Pro), Shared Object Repositories use the .TSR extension and Local Object Repositories use the .MTR extension. .QRS and .QFL are not standard QTP repository file extensions. Understanding these extensions is important for managing and sharing object repositories across QTP tests.
-
(.TSR and .QRS)
-
(.QRS and .MTR)
-
(.TSR and .MTR)
-
(.MTR and .QFL)
C
Correct answer
Explanation
In HP QuickTest Professional (QTP) / Unified Functional Testing (UFT), Shared Object Repositories are saved with the .tsr extension, while Local Object Repositories are saved with the .mtr extension.
-
fchmode()
-
fchmod()
-
chmod()
-
All the above.
B
Correct answer
Explanation
fchmod() is the Unix system call that changes file permissions using a file descriptor rather than a filename. chmod() uses a filename path instead. Option A 'fchmode()' is a typo - not a real system call. Option D is incorrect because only fchmod() uses file descriptor.