Here is powerful and simple use for the Linux find command – finding files or folders by one or more groups. Let’s get right onto the examples: Find files by group students find -type f . -group students Find folders/directories by group students find -type d . -group students Find files by groups student and teachers find -type… Read more
Linux/Unix
How to Find Files Owned by Users(s) in Linux
The find command in Linux/Unix is extremely powerful and can take some time to learn all of its uses. In previous articles, we have explained how to it to find files greater than or less than a certain size, find number of files in a folder, and finding the largest files on your computer. This article… Read more
Insert/Add String to Beginning of a File
In a previous article, I showed you how to append a string to the end of file. Now I will show you how to insert a string to the beginning of a file in Linux. The solution is not as obvious as the former, but I will show you a quick and easy way using… Read more
Linux – How to find the number of files in a folder?
This seems like a pretty simple piece of information to ask for, but then why is there no intuitive way for Linux novices to accomplish this? In Windows command-line, the output of the dir command includes the number of files and the number of folders in the current directory. Well, here are some ways you… Read more
How to create a large number of files in Linux (thousands or millions)
Do you need an ultra fast way to create a large number of files in Linux? Perhaps, you are doing some load testing for an application and you need to create 1000 or even 1,000,000 files in the matter of seconds. Well, here is how to do it! There are two parts to creating these… Read more
Linux: How to Kill all instances of a script/program by using a string search
This article will show you how to kill (or end) multiple processes or instances of a running script with a single command. If you are like me, you have run into this situation many many times. You run the ps command to list all the currently running processes and you see that there are multiple… Read more
Run a script on Linux startup in 2 simple steps
There are several ways to run a script or program at startup on a Linux machine, especially when taking into account the various run levels. This example is a quickstart method on how to run it at run level 3. Copy your script or file to /etc/init.d Create a symbolic link from this file to… Read more