06-19-2009
for FILE in *; do
ls -dL $FILE >/dev/null 2>&1 || echo RM $FILE
done
Or recursively...
for FILE in $(find .); do
ls -dL $FILE >/dev/null 2>&1 || echo RM $FILE
done
replace the echo RM with rm when you're happy!
7 More Discussions You Might Find Interesting
1. Solaris
My SUN V210 refuses to fully boot up. We had a power outage (ie. someone tripped the cord) and thereafter the Sun will not come up, and the OS is not starting. The LED on the front is not lit.
Monitor gets no feed, so I plugged in via the management port.
The system comes up to:
Trap 3e. and... (7 Replies)
Discussion started by: ireeneek
7 Replies
2. Shell Programming and Scripting
Hi all can you please help me what is dead.letter file ?
when it is created ? for the first time i have seen this file getting created in my current directory?
I am using SunOs.
Any IDEA ?? (2 Replies)
Discussion started by: jambesh
2 Replies
3. Shell Programming and Scripting
Hi,
I am new to unix
I am removing some unwanted files from the directory by using the following command
find . -name "*" -exec rm -f {} \;
But i want the corresponding links also to be removed
can one help me
Thanks (1 Reply)
Discussion started by: Satyak
1 Replies
4. What is on Your Mind?
On servers i check there seems to be no news at all. (3 Replies)
Discussion started by: Action
3 Replies
5. Shell Programming and Scripting
Hello,
I recently just switched my phphandler to suPHP on my server in order to increase security a bit. I am working with 2 scripts, one of which is vbulletin forums and the other is custom. The vbulletin forum avatars are all symbolic links to pictures in the other custom script. When I... (2 Replies)
Discussion started by: ambition13
2 Replies
6. Solaris
When loooking at files in a directory using ls, how can I tell if I have a hard link or soft link? (11 Replies)
Discussion started by: Harleyrci
11 Replies
7. AIX
Hi
I'm logged in as root in an aix box
Which command will list all the soft links and hard links present in the server ? (2 Replies)
Discussion started by: newtoaixos
2 Replies