LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 02-26-2009, 06:18 AM   #16
yanchina12
LQ Newbie
 
Registered: Dec 2007
Posts: 13

Original Poster
Rep: Reputation: 0

Dear schneidz ,

Both the code you added with your recent post works but it prints all the folders name so it includes the folders which has a .cm file. .cm files is simple text file .

Your help is much appreciated!

Regards,
Yan
 
Old 02-26-2009, 09:16 AM   #17
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
i am stuck at work rite now with a win-xp machine so i am unable to test it but this is what i think it does:
Code:
for dir in u* # create a list of all dirs that begin with u
do
 if [ ! -f $dir/*.cm ] # if u*/*.cm does not exist
 then
  echo $dir # print out u*
 fi
done # go to next u*
 
  


Reply



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
Change file permissions of files in folders dotancohen Linux - Newbie 1 05-19-2007 02:56 AM
Folders, and Mounts and File associations in KDE wombat53 Slackware 9 10-02-2005 10:18 PM
Desktop File Folders don't work Keithj Linux - Software 1 06-14-2005 12:25 PM
File moving on mounted folders from Java zeshanzia Programming 0 03-11-2005 01:00 AM
Changing file permissions within multiple folders cloudxiii Linux - Newbie 1 02-21-2005 12:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:01 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
Open Source Consulting | Domain Registration