Linux command count number of files per folder

1 comment:
Count number of files per folder with this command:

# find * -maxdepth 0 -type d -exec sh -c "echo -n {} ' ' ; ls -lR {} | wc -l" \;

Jboss is truncating log file contents when it is restarted

In order to avoid truncating server.log file contents when restarting jboss, change jboss-log4j.xml FILE Appender class.

<appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">

No packages marked for update message is returned when using yum with rhn_register

No comments:
After registering redhat linux system for rhn, yum update command returned "No Packages marked for Update"

# yum update
Loaded plugins: downloadonly, security
Setting up Update Process
No Packages marked for Update

Permission denied message when installing vmtools

No comments:
When installing vmtools on a linux machine inside the /tmp directory, got this error:
./ /usr/bin/perl: bad interpreter: Permission denied

Then looked at tmp for permissions:
lrwxrwxrwx   1 root root     31 Mar  6 11:13

It seems ok but if /etc/fstab has noexec option like:
LABEL=/tmp    /tmp    ext3    nosuid,noexec,nodev    1    2

Changed with this one and remount again:
LABEL=/tmp    /tmp    ext3    defaults    1    2