File - page 4

Read filename without extension in Bash
If you want to retrieve the filename without extension, then you have to provide the file extension as SUFFIX with `basename` command. Here, the exten...
File carving tools
What is a file carving tool? What is file carving in digital forensics? Which of the following is a file carving tool? What is the difference between ...
6 Ways to Open Folders in Ubuntu 18.04 LTS
6 Ways to Open Folders in Ubuntu 18.04 LTS Open a Folder In the File Manager (Nautilus) Search and Open a Folder through the Dash. Access a folder In ...
How to Display File Contents in Column Format in Linux Terminal
How do you display the contents of a file in Linux? How do I view the contents of a file in Terminal? How do I show a column in Linux? How do you disp...
How to Rename a File in Bash
To use mv to rename a file type mv , a space, the name of the file, a space, and the new name you wish the file to have. Then press Enter. You can use...
How to Get Absolute Directory Path in PHP Script
How do I find the absolute path of a file? How do I find my PHP path? How can I get full image path in PHP? How can I get previous directory in PHP? W...
How to Count Number of Lines in File with Python
Use len() to get the number of nonempty lines in the file. file = open(sample.txt, r) line_count = len(nonempty_lines) file. close() print(line_count)...
How to Check if a Filesystem is Mounted in Linux?
Our first and most used way in the Linux system to know the filesystem type is the “findmnt” command. The “findmnt” command helps us find all the moun...
How to view contents of ZIP archive in Linux
Using Vim. Vim command can also be used to view the contents of a ZIP archive without extracting it. It can work for both the archived files and folde...
Unlink Command in Linux (Remove File)
How to Remove Files To delete a single file, use the rm or unlink command followed by the file name unlink filename rm filename. ... To delete multipl...
How to Defragment an XFS File System
Defragmenting An XFS File System The defragmentation is done with the xfs_fsr tool, which is a file system reorganizer for XFS. It works by improving ...
How to Read and Write INI and Conf Files Using Python
How do I read a config INI file in Python? How do you create and read config file in Python? How do I use Config INI in Python? What is config INI fil...