Linux offers you various amazing command-line commands that will help in performing various tasks. One of the major tasks performed from the command line of Linux is to check the size of the file or folder. It might be necessary to make space for the incoming file or transfer it to anothe...
This is the more recommended (albeit slightly confusing) method of checking file permissions in Linux. We’ll be using the ls tool that comes preinstalled in all Linux distros. To check the file permissions, run the following ls command. Check out this guide for anin-depth exploration of the...
How to Change the Owner of a File in Linux If you want to change a file’s owner, you can use the chown command. Open the terminal and type in “chown username filename”. So, for example, if you want Mark to be the owner of file123, you’ll type in “chown mark file123.” ...
The ls command cannot (correctly) show you the size of a folder. It always displays as 4K (block size). That's because, technically, a directory is a file that has information on the location of other files in the memory. To get the directory size, you use the du command (disk util...
Find a Folder in Linux Many routine tasks in Linux, such as creating orediting a configuration file, will require you to locate particular folders. While there are lots of easy methods for finding files, locating a directory is not as straightforward. A simple search with one of the common ...
Let’s say you have several folders named in seriesDocument1,Document2, and you want to rename them toWork1,Work2. You can use therenamecommand for this activity: $ rename -v 's/Document/Work/' * This command will replaceDocument withWorkin the folder names within the current working di...
7) How to find only the folder’s modified in last 5 Days This command displays only folders modified within the last 5 days. # find /home/daygeek/shell-script -type d -mtime-5-ls 2494645 4 drwxr-xr-x 6 daygeek daygeek 4096 Sep 20 12:55 /home/daygeek/shell-script 2498566 4 drw...
We’ve used a Ubuntu 20.04 install but you could run this how-to on a Raspberry Pi. All of the how-to is performed via the Terminal. You can open a terminal window on most Linux machines by pressing ctrl, alt and t. How to Check File Permissions in Linux (Image credit: Tom's ...
If you want to implement more advanced usage, you can check the man pages of find and locate using the below command. $ man find Copy $ man locate Copy Conclusion With Linux's various commands, you can make your work easier and more efficient. One of the commonly used commands is for...
How to check available disk space in Ubuntu command line? On Linux check disk space in gb or disk usage by folder. Terminal commands to check hard disk space in Linux terminal. Before we begin, let use see the GUI way to check disk space in Linux Ubuntu: ...