LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-31-2005, 08:35 AM   #1
mariusak
LQ Newbie
 
Registered: Feb 2004
Distribution: Debian 3.0
Posts: 23

Rep: Reputation: 15
Question How to "touch" an entire folder?


Hi!

I would like to modify the Modified date of an entire folder, meaning all of it's files and all the files in it's subfolders..

For this i guess I have to use the touch command. Example:

touch -mt CCYYMMDDhhmm FILENAME

How can I do this recursively? with for instance chmod you can use -R if i remeber correctly..


-Thanks for your help

Last edited by mariusak; 05-31-2005 at 09:24 AM.
 
Old 05-31-2005, 09:15 AM   #2
visaris
Member
 
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
Loop up the "find" command and the -exec option in particular. You can use find to find all files in a directory recursively, and use the -exec option to execute a command on each one of those files.
"man find" should tell you everything you need to know.
 
Old 05-31-2005, 09:24 AM   #3
mariusak
LQ Newbie
 
Registered: Feb 2004
Distribution: Debian 3.0
Posts: 23

Original Poster
Rep: Reputation: 15
thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"rm -rf /tmp", now Evolution shows "(no folder displayed" Ed-MtnBiker Linux - Software 7 04-10-2006 05:05 PM
How do I put my entire system into "root", not just the konsole? GameGuru Linux - Newbie 11 07-04-2005 02:21 PM
"startx" crashes entire system after xorgconfig is run sether Arch 7 11-16-2004 03:11 PM
Turn off touch pad "clicking" pgte3 Linux - Newbie 7 08-25-2004 02:59 PM
Can't boot Mandrake 10.0, "Cannot touch, Read-Only File System" RasutoIbuki Mandriva 5 07-23-2004 09:57 PM


All times are GMT -5. The time now is 04:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration