Which command can be utilized to change the name of a file in UNIX?
Show answer Hide answer
Answer: B. mv
Explanation
The mv command is used to move or rename files within Unix and Linux systems. Renaming a file is fundamentally equivalent to moving it to a new name within the same directory. File reference pointers are updated in the filesystem directory structure instantly. The command name mv stands for move within standard Unix utility conventions. Providing a new filename as the destination argument renames the original file. No file data is duplicated during a rename operation making it extremely efficient.
Updating document names or reorganizing project folders requires reliable rename commands. System administrators rename configuration files to disable services or back up settings. Mastering file manipulation commands is essential for effective terminal usage. Option A is a command used in DOS environments rather than standard Unix shells. Option C removes files entirely rather than changing their names. Option D uses an invalid English word instead of the correct Unix utility name.
- Subject
- Computer Science
- Category
- Software Engineering
- Topic
- —
- Difficulty
- medium
Related questions
Q1. Which command is used to view services currently active on an NFS server?
Show answer Hide answer
Answer: A. rpcinfo
The rpcinfo command reports the status of Remote Procedure Call services, including NFS. It queries portmappers to list active RPC programs, versions, and network protocols. Checking RPC status helps verify whether netwo...
Q2. Which of these is not a command used in vi Input mode?
Show answer Hide answer
Answer: D. j
The j key functions as a cursor movement command in vi command mode rather than inserting text. Pressing this key moves the cursor down one line within the active text document. Navigation keys remain inactive while typi...
Q3. Which command is used to output the final 10 lines of a file?
Show answer Hide answer
Answer: B. tail
The tail command outputs the final portion of a file, defaulting to ten lines. This utility is essential for reviewing recent updates in growing text documents. System logs are frequently inspected using this command to...
Q4. Which of these commands is used to copy directory structures in and out________________?
Show answer Hide answer
Answer: B. cpio
The cpio command is used to copy file archives in and out of files or storage devices. It reads file lists from standard input and creates or extracts archive structures. This utility supports backing up directory hierar...
Q5. What specific command-line instruction is utilized to output your current working directory?
Show answer Hide answer
Answer: D. path
The 'pwd' (print working directory) command outputs the current directory path, not 'path'.
Q6. Which command enables two-way communication between you and another logged-in user?
Show answer Hide answer
Answer: C. write
The write command establishes an interactive two-way communication channel between two logged-in terminal users. Typing this command followed by a username allows messages to appear instantly on the recipient screen. Bot...