Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

Linux Tutorials: find commands examples

rajeshkumar replied the topic: Re: Find files with the Linux find command
This next example is similar, but here I use the -i argument to the grep command, telling it to ignore the case of the characters string, so it will find files that contain string, String, STRING, etc.:
find . -type f -name “*.java” -exec grep -il string {} \;

This command searches through the /usr/local directory for files that end with the extension .html. When these files are found, their permission is changed to mode 644 (rw-r–r–).
find /usr/local -name “*.html” -type f -exec chmod 644 {} \;

This command searches through the htdocs and cgi-bin directories for files that end with the extension .cgi. When these files are found, their permission is changed to mode 755 (rwxr-xr-x). This example shows that the find command can easily search through multiple sub-directories (htdocs, cgi-bin) at one time.
find htdocs cgi-bin -name “*.cgi” -type f -exec chmod 755 {} \;

From time to time I run the find command with the ls command so I can get detailed information about files the find command locates. To get started, this find command will find all the “*.pl” files (Perl files) beneath the current directory:
find . -name “*.pl”

In my current directory, the output of this command looks like this:
./news/newsbot/old/3filter.pl
./news/newsbot/tokenParser.pl
./news/robonews/makeListOfNewsURLs.pl

That’s nice, but what if I want to see the last modification time of these files, or their filesize? No problem, I just add the “ls -ld” command to my find command, like this:
find . -name “*.pl” -exec ls -ld {} \;
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re: Find files with the Linux find command
To perform a case-insensitive search with the Unix/Linux find command, use the -iname option instead of -name. So, to search for all files and directories named foo, FOO, or any other combination of uppercase and lowercase characters beneath the current directory, use this command:
find . -iname foo

If you’re just interested in directories, search like this:
find . -iname foo -type d

And if you’re just looking for files, search like this:
find . -iname foo -type f
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re: Find files with the Linux find command
To find all files modified on a certain date, for example, ‘2007-06-07’ the final input is:
find . -type f -newermt 2011-04-20 ! -newermt 2011-04-21

Search for files in your home directory which have been modified in the last twenty-four hours. This command works this way because the time since each file was last modified is divided by 24 hours and any remainder is discarded. That means that to match -mtime
0, a file will have to have a modification in the past which is less than 24 hours ago.

find . -mtime 0

Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

Chmod: Change File Permissions Recursively

Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus. I share tech blog at DevOps School, travel stories at Holiday…

Read More

Shell Bash Scripting: Assignment & Excercise – 14

Write a Shell Bash Script for convert Decimal Number to Binary Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at Cotocus….

Read More

Shell Bash Scripting: Assignment & Excercise – 13

Write a Shell Bash Script for test if a number being entered is a Fibonacci or not Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and…

Read More

Shell Bash Scripting: Assignment & Excercise – 12

Write a Shell Bash Script for check if a number is prime or not Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have…

Read More

Shell Bash Scripting: Assignment & Excercise – 11

Write a Shell Bash Script for check if a provided number is Armstrong or not Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I…

Read More

Shell Bash Scripting: Assignment & Excercise – 10

Write a Shell Bash Script for check if a number input from standard input is odd or even Rajesh KumarI’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x