Please check the following site:
http://kote.host.ge/network/modems/zyxel_dsl_router/index.html
Thursday, September 30, 2010
How to configure nat port translation in a ZyXEL 661 ADSL router
Problem
Configuring Port Mapping via web interface is not possible. Use telnet commands detailed below.
Solution
If you are having problems configuring port mapping on a Zyxel router, the below instructions should help you.
There is no way of doing this using the web GUI so please use the telnet command to configure port mapping. You can only do port address translation via the command line interface (telnet):
Example 1: translate external ports 4420 through 4422 to internal ports 8080 through 8082 ip 192.168.26.101
:4420 -> 192.168.26.101:8080
:4421 -> 192.168.26.101:8081
:4422 -> 192.168.26.101:8082
ip nat server load 1
ip nat server edit 2 svrport 4420 4422
ip nat server edit 2 intport 8080 8082
ip nat server edit 2 forwardip 192.168.26.101
ip nat server edit 2 active yes
ip nat server save
To display the table
ip nat server load 1
ip nat server disp 1
Notes: (1) The "load 1" is required to loading the set #1 (1st page) of rules, the "edit 2" refers to the 2nd rule (in set #1) (2) svrport refers to the ports as they appear on the WAN side before the translation (3) intport refers to the ports as they appear on the LAN side after the translation (4) if you view the port forwarding rules in the web interface (Network > NAT) the external ports (svrport) are shown in rule 1 (N-1)
If your firewall is enabled, then you will need to create a firewall rule based on the internal ports (intport).
Add WAN/LAN rule 1 Permit Source IP = any Destination IP = 192.168.26.101 Service = TCP/UDP Port 8080 to 8082
Example 2: translate external; ports 4420 through 4422 to internal port 80 on IPs 192.168.26.101 through 192.168.26.103
:4420 -> 192.168.26.101:80
:4421 -> 192.168.26.102:80
:4422 -> 192.168.26.103:80
ip nat server load 1
ip nat server edit 2 svrport 4420 4420
ip nat server edit 2 intport 80 80
ip nat server edit 2 forwardip 192.168.26.101
ip nat server edit 2 active yes
ip nat server edit 3 svrport 4421 4421
ip nat server edit 3 intport 80 80
ip nat server edit 3 forwardip 192.168.26.102
ip nat server edit 3 active yes
ip nat server edit 4 svrport 4422 4422
ip nat server edit 4 intport 80 80
ip nat server edit 4 forwardip 192.168.26.103
ip nat server edit 4 active yes
ip nat server save
The firewall is simpler
Add WAN/LAN rule 1 Permit Source IP = any Destination IP = 192.168.26.101 to 192.168.26.103 Service = http
A quick example
Forward port 8080 to internal server 192.168.1.231 port 80
ip nat server load 1
ip nat server disp 1
ip nat server edit 2 active 1
ip nat server edit 2 svrport 8080 8080
ip nat server edit 2 intport 80 80
ip nat server edit 2 forwardip 192.168.1.231
ip nat server save
For more info take a look at
http://www.granitecomputers.co.uk/resources/knowledge_detail.asp?kbid=19
Configuring Port Mapping via web interface is not possible. Use telnet commands detailed below.
Solution
If you are having problems configuring port mapping on a Zyxel router, the below instructions should help you.
There is no way of doing this using the web GUI so please use the telnet command to configure port mapping. You can only do port address translation via the command line interface (telnet):
Example 1: translate external ports 4420 through 4422 to internal ports 8080 through 8082 ip 192.168.26.101
:4420 -> 192.168.26.101:8080
:4421 -> 192.168.26.101:8081
:4422 -> 192.168.26.101:8082
ip nat server load 1
ip nat server edit 2 svrport 4420 4422
ip nat server edit 2 intport 8080 8082
ip nat server edit 2 forwardip 192.168.26.101
ip nat server edit 2 active yes
ip nat server save
To display the table
ip nat server load 1
ip nat server disp 1
Notes: (1) The "load 1" is required to loading the set #1 (1st page) of rules, the "edit 2" refers to the 2nd rule (in set #1) (2) svrport refers to the ports as they appear on the WAN side before the translation (3) intport refers to the ports as they appear on the LAN side after the translation (4) if you view the port forwarding rules in the web interface (Network > NAT) the external ports (svrport) are shown in rule 1 (N-1)
If your firewall is enabled, then you will need to create a firewall rule based on the internal ports (intport).
Add WAN/LAN rule 1 Permit Source IP = any Destination IP = 192.168.26.101 Service = TCP/UDP Port 8080 to 8082
Example 2: translate external; ports 4420 through 4422 to internal port 80 on IPs 192.168.26.101 through 192.168.26.103
:4420 -> 192.168.26.101:80
:4421 -> 192.168.26.102:80
:4422 -> 192.168.26.103:80
ip nat server load 1
ip nat server edit 2 svrport 4420 4420
ip nat server edit 2 intport 80 80
ip nat server edit 2 forwardip 192.168.26.101
ip nat server edit 2 active yes
ip nat server edit 3 svrport 4421 4421
ip nat server edit 3 intport 80 80
ip nat server edit 3 forwardip 192.168.26.102
ip nat server edit 3 active yes
ip nat server edit 4 svrport 4422 4422
ip nat server edit 4 intport 80 80
ip nat server edit 4 forwardip 192.168.26.103
ip nat server edit 4 active yes
ip nat server save
The firewall is simpler
Add WAN/LAN rule 1 Permit Source IP = any Destination IP = 192.168.26.101 to 192.168.26.103 Service = http
A quick example
Forward port 8080 to internal server 192.168.1.231 port 80
ip nat server load 1
ip nat server disp 1
ip nat server edit 2 active 1
ip nat server edit 2 svrport 8080 8080
ip nat server edit 2 intport 80 80
ip nat server edit 2 forwardip 192.168.1.231
ip nat server save
For more info take a look at
http://www.granitecomputers.co.uk/resources/knowledge_detail.asp?kbid=19
Thursday, September 23, 2010
Windows 7 / Vista loses local resources when connected to VPN
Starting with Vista there is a hidden configuration setting called UseRasCredentials.
If this is set to 1 Windows uses the credentials of the VPN connection for all further accesses (this is contrary to the behaviour of XP).
To fix this problem:
If this is set to 1 Windows uses the credentials of the VPN connection for all further accesses (this is contrary to the behaviour of XP).
To fix this problem:
- Locate the .pbk file that contains the entry that you dial. You can find this file in location C:\Users\Username
\AppData\Roaming\Microsoft\Network\Connections\Pbk - Open the file in Notepad.
- Locate the following entry: UseRasCredentials=1
- Modify the entry to the following: UseRasCredentials=0
- On the File menu, click Save, and the click Exit.
Tuesday, September 21, 2010
vSphere Client performs slowly on a Windows 7 system
From this KB article from VMware we read:
When running the vSphere Client on a Windows 7 machine, you experience these symptoms:
This issue occurs when desktop composition is enabled.
To disable desktop composition:
Run the vSphere Client.
When running the vSphere Client on a Windows 7 machine, you experience these symptoms:
- The performance of the vSphere Client is slow
- Redraws are visibly noticeable, especially when maximising the vSphere Client
This issue occurs when desktop composition is enabled.
To disable desktop composition:
- Right-click the shortcut for the vSphere Client and click Properties.
- Click the Compatibility tab.
- Select Disable desktop composition.
- Click OK.
Run the vSphere Client.
Cloning and converting virtual machine disks with vmkfstools
Please read this article from VMware KB.
Monday, September 20, 2010
Thursday, September 16, 2010
Slow mouse movement in a Windows Server 2008 R2 VM hosted in ESXi 4.1
When you create a Windows 2008 Server R2 VM hosted in a vSphere 4.x hypervisor you see that the mouse is not moving as fast as it does in a Windows 2003 Server VM. This is what you must do to resolve this issue:
- Power off the VM and change the total video RAM assigned to this VM using the Edit Settings menu. Set the Video card Display Memory to Auto-detect video settings.
- Power on the VM again and after you login to the system go to the Device Manager and install the following driver for the Video-Card: C:\Program Files\Common Files\VMware\Drivers\wddm_video
- Reboot the VM again.
Error in vSphere HA configuration after upgrading to vCenter 4.1
After upgrading to vCenter Server 4.1, when you run an ESXi 4.0 host on that vCenter Server inventory, you see these symptoms:
The ESXi host reconfigures successfully for HA, but immediately displays an error
In the Summary tab, you see the error:
HA agent on in cluster has an error: error while running health check script
The issue occurs because the management agents on the ESXi host are not upgraded properly.
To resolve this issue, you must manually remove and reinstall the agents.
To manually remove and reinstall the agents:
/opt/vmware/uninstallers/VMware-aam-ha-uninstall.sh
The ESXi host reconfigures successfully for HA, but immediately displays an error
In the Summary tab, you see the error:
HA agent on
The issue occurs because the management agents on the ESXi host are not upgraded properly.
To resolve this issue, you must manually remove and reinstall the agents.
To manually remove and reinstall the agents:
- Right-click the ESXi host and click Disconnect. This disconnects the ESXi host from the VirtualCenter Inventory.
- Log in to the ESXi host using the Tech Support mode. For more information, see Tech Support Mode for Emergency Support (1003677) article in VMware.
- Run these commands to uninstall the vpxa and aam components from the ESXi host:
/opt/vmware/uninstallers/VMware-aam-ha-uninstall.sh
- Right-click the ESXi host and click Connect. This re-installs the vpxa agent.
- Add the host to the appropriate cluster. This re-installs the aam agent.
Monday, September 13, 2010
How to replace vCenter 4.1 SSL certificate
Please read the following articles:
http://www.vmware.com/resources/techresources/10124
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1030661
http://www.gavinadams.org/blog/2010/07/14/replacing-vcenter-4-1-ssl-certificate-with-active-directory-issued-one
How to create a self-signed certificate for VirtualCenter using OpenSSL
VirtualCenter Server Fails to Start After You Replace Default SSL Certificates with Custom SSL Certificates
VMware vCenter Server plugins fail after adding custom SSL certificates
vCenter Service Status displays an error for com.vmware.converter
vCenter Server Service Status plug-in cannot be enabled
http://derek858.blogspot.com/2009/11/vsphere-esxi-ssl-mystery-solved.html
How to generate Domain Root CA signed certificates for vCenter Server
http://www.vmware.com/resources/techresources/10124
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1030661
http://www.gavinadams.org/blog/2010/07/14/replacing-vcenter-4-1-ssl-certificate-with-active-directory-issued-one
How to create a self-signed certificate for VirtualCenter using OpenSSL
VirtualCenter Server Fails to Start After You Replace Default SSL Certificates with Custom SSL Certificates
VMware vCenter Server plugins fail after adding custom SSL certificates
vCenter Service Status displays an error for com.vmware.converter
vCenter Server Service Status plug-in cannot be enabled
http://derek858.blogspot.com/2009/11/vsphere-esxi-ssl-mystery-solved.html
How to generate Domain Root CA signed certificates for vCenter Server
vCenter 4 service does not start after server reboot
This occurs if you are running the vCenter database (SQL Server) on the same server as vCenter itself.
To resolve this issue we need to create a dependency for the VMware VirtualCenter Server service for the following services:
MSSQL$SQLEXP_VIM
ADAM_VMwareVCMSDS
Run regedit and go to the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpxd
Edit the DependOnService value adding these values:
MSSQL$SQLEXP_VIM
ADAM_VMwareVCMSDS
Restart the server to check if all is ok.
For more info check this post
http://www.vmadmin.co.uk/vmware/36-virtualcenter/198-vcenterservicedep
To resolve this issue we need to create a dependency for the VMware VirtualCenter Server service for the following services:
MSSQL$SQLEXP_VIM
ADAM_VMwareVCMSDS
Run regedit and go to the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpxd
Edit the DependOnService value adding these values:
MSSQL$SQLEXP_VIM
ADAM_VMwareVCMSDS
Restart the server to check if all is ok.
For more info check this post
http://www.vmadmin.co.uk/vmware/36-virtualcenter/198-vcenterservicedep
Sunday, September 12, 2010
How to enable administrative shares in windows 7
First use Network and Sharing Center to enable File and Print Sharing
Then run regedit and go to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
In this key enter a 32-bit word value named LocalAccountTokenFilterPolicy with value equal to 1.
Restart the system to activate the change.
To disable this policy delete this value or make it 0.
Then run regedit and go to the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
In this key enter a 32-bit word value named LocalAccountTokenFilterPolicy with value equal to 1.
Restart the system to activate the change.
To disable this policy delete this value or make it 0.
Saturday, September 11, 2010
Copying SQL Server databases with Backup and Restore
Please read the following articles:
Copying Databases with Backup and Restore
How to Restore a Database to a New Location and Name (Transact-SQL)
Examples
-------------
How to change recovery model of a database
----------------------------------------------
alter database [Database1] set recovery full
alter database [Database1] set recovery simple
==================================
How to backup a database
---------------------------
backup database [Database1] to disk = 'c:\Backup\back.bak' with init
===============================================
How to find information about a database
-----------------------------------------
SP_HELPDB [Database1]
===============================================
How to find the logical name of the database
---------------------------------------------
RESTORE FILELISTONLY FROM DISK='full_path_of_backup_file'
===============================================
How to restore the database to a new server with a new name
------------------------------------------------------------
RESTORE DATABASE [Database2]
FROM DISK='full_path_of_backup_file'
WITH MOVE 'Database1' TO 'C:\Customers\DBS\Database2.mdf',
MOVE 'Database1_log' TO 'C:\Customers\DBS\Database2_log.ldf'
---------------------------------------
How to restore a vcenter database
---------------------------------------
----Alter Database to single user mode
ALTER DATABASE VIM_VCDB
SET SINGLE_USER WITH
ROLLBACK IMMEDIATE
----Restore Database
RESTORE DATABASE VIM_VCDB
FROM DISK='C:\Backup\VCDB.bak'
WITH REPLACE,
MOVE 'vcdb' TO 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\VIM_VCDB.mdf',
MOVE 'vcdb_log' TO 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\VIM_VCDB_log.ldf'
----If there is an error in statement above, enter the following
----command to revert to multi user
ALTER DATABASE VIM_VCDB SET MULTI_USER
GO
Copying Databases with Backup and Restore
How to Restore a Database to a New Location and Name (Transact-SQL)
Examples
-------------
How to change recovery model of a database
----------------------------------------------
alter database [Database1] set recovery full
alter database [Database1] set recovery simple
==================================
How to backup a database
---------------------------
backup database [Database1] to disk = 'c:\Backup\back.bak' with init
===============================================
How to find information about a database
-----------------------------------------
SP_HELPDB [Database1]
===============================================
How to find the logical name of the database
---------------------------------------------
RESTORE FILELISTONLY FROM DISK='full_path_of_backup_file'
===============================================
How to restore the database to a new server with a new name
------------------------------------------------------------
RESTORE DATABASE [Database2]
FROM DISK='full_path_of_backup_file'
WITH MOVE 'Database1' TO 'C:\Customers\DBS\Database2.mdf',
MOVE 'Database1_log' TO 'C:\Customers\DBS\Database2_log.ldf'
---------------------------------------
How to restore a vcenter database
---------------------------------------
----Alter Database to single user mode
ALTER DATABASE VIM_VCDB
SET SINGLE_USER WITH
ROLLBACK IMMEDIATE
----Restore Database
RESTORE DATABASE VIM_VCDB
FROM DISK='C:\Backup\VCDB.bak'
WITH REPLACE,
MOVE 'vcdb' TO 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\VIM_VCDB.mdf',
MOVE 'vcdb_log' TO 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data\VIM_VCDB_log.ldf'
----If there is an error in statement above, enter the following
----command to revert to multi user
ALTER DATABASE VIM_VCDB SET MULTI_USER
GO
Thursday, September 9, 2010
Migrating an existing vCenter Server database to 4.1 using the Data Migration Tool
Please read the following articles:
Migrating an existing vCenter Server database to 4.1 using the Data Migration Tool
Backing-up and restoring vCenter Server 4.x
vCenter Server 4.1 Data Migration Tool fails with the error: HResult 0x2, Level 16, State 1
Using the Data Migration Tool to upgrade from vCenter Server 4.0 to vCenter Server 4.1 fails
Moving the VirtualCenter SQL database
Migrate vCenter 4.0 database to new vCenter 4.1 server
Migrating an existing vCenter Server database to 4.1 using the Data Migration Tool
Backing-up and restoring vCenter Server 4.x
vCenter Server 4.1 Data Migration Tool fails with the error: HResult 0x2, Level 16, State 1
Using the Data Migration Tool to upgrade from vCenter Server 4.0 to vCenter Server 4.1 fails
Moving the VirtualCenter SQL database
Migrate vCenter 4.0 database to new vCenter 4.1 server
How to configure pagefile in windows 2008 Server Core
From http://www.hyper-v.nu/blogs/jaapwess/?p=41 we read:
To configure the pagefile on a Hyper-V Server Core or Hyper-V Server you can use the following commands:
wmic computersystem set AutomaticManagedPagefile=False
wmic pagefileset where name="c:\\pagefile.sys" set InitialSize=4000,MaximumSize=6000
It is possible to check the pagefile settings using the following command:
wmic pagefile get /format:list
To configure the pagefile on a Hyper-V Server Core or Hyper-V Server you can use the following commands:
wmic computersystem set AutomaticManagedPagefile=False
wmic pagefileset where name="c:\\pagefile.sys" set InitialSize=4000,MaximumSize=6000
It is possible to check the pagefile settings using the following command:
wmic pagefile get /format:list
Labels:
Core,
Hyper-V,
Hyper-V R2,
Windows Server 2008,
Windows Server 2008 R2
Wednesday, September 8, 2010
Tuesday, September 7, 2010
How to enable remote connections to an SQL Server 2005 Express VMware VCenter Database
- Enabled remote connection on SQL Server Surface Area Configuration
Open SQL Server Surface Area Configuration.
Select Surface Area Configuration for Services and Connections.
On the left side, expand your SQL Server instance -> Database Engine -> Remote Connections. On the right side, select Local and remote connections -> using both TCP/IP and named pipes.
On the left side, select SQL Server Browser -> Service.
On the right side, if the startup type is Disable, you need to change to Automatic and click Apply and click Start button to start the service. Then, click OK.
- Change this registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\LoginMode
(MSSQL.1 relates to the instance you want to play with – it could be MSSQL.2, or .3 etc).
It’s default value is 1. Set it to 2 to allow both windows authentication and sql logins.
You have to restart the SQL services before the changes apply.
- To change sa password open a command prompt and enter this command
osql -E -S vcenter\SQLEXP_VIM
You will see this prompt:
1>
In this prompt enter these commands (replace sapwd with your password)
ALTER LOGIN sa WITH PASSWORD = 'sapwd';
GO
ALTER LOGIN sa ENABLE;
GO
Type exit to exit osql
- Try to connect to SQL Server using sa account and entering your new password
osql -U sa -S vcenter\SQLEXP_VIM
Resources:
http://support.microsoft.com/kb/322336
http://support.microsoft.com/kb/325003
http://support.microsoft.com/kb/322336
http://blogs.msdn.com/b/sql_protocols/archive/2005/10/22/483684.aspx
http://msdn.microsoft.com/en-us/library/ms165702.aspx
http://www.linglom.com/2007/08/31/enable-remote-connection-to-sql-server-2005-express/
Open SQL Server Surface Area Configuration.
Select Surface Area Configuration for Services and Connections.
On the left side, expand your SQL Server instance -> Database Engine -> Remote Connections. On the right side, select Local and remote connections -> using both TCP/IP and named pipes.
On the left side, select SQL Server Browser -> Service.
On the right side, if the startup type is Disable, you need to change to Automatic and click Apply and click Start button to start the service. Then, click OK.
- Change this registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\LoginMode
(MSSQL.1 relates to the instance you want to play with – it could be MSSQL.2, or .3 etc).
It’s default value is 1. Set it to 2 to allow both windows authentication and sql logins.
You have to restart the SQL services before the changes apply.
- To change sa password open a command prompt and enter this command
osql -E -S vcenter\SQLEXP_VIM
You will see this prompt:
1>
In this prompt enter these commands (replace sapwd with your password)
ALTER LOGIN sa WITH PASSWORD = 'sapwd';
GO
ALTER LOGIN sa ENABLE;
GO
Type exit to exit osql
- Try to connect to SQL Server using sa account and entering your new password
osql -U sa -S vcenter\SQLEXP_VIM
Resources:
http://support.microsoft.com/kb/322336
http://support.microsoft.com/kb/325003
http://support.microsoft.com/kb/322336
http://blogs.msdn.com/b/sql_protocols/archive/2005/10/22/483684.aspx
http://msdn.microsoft.com/en-us/library/ms165702.aspx
http://www.linglom.com/2007/08/31/enable-remote-connection-to-sql-server-2005-express/
Friday, September 3, 2010
Windows 7 deployment articles
Read these blog posts:
Capture and Apply Windows Images
Apply Images by Using ImageX
BCDboot Command-Line Options
Deploy a System Recovery Image
http://mikespcbabble.com/WinPE3.aspx
http://blog.brianleejackson.com/sysprep-a-windows-7-machine-start-to-finish-v2
http://www.windowsnetworking.com/articles_tutorials/Deploying-Windows-7-Part19.html
http://blog.brianleejackson.com/formatting-winpe-3-0-usb-flash-drive-dism
http://edge.technet.com/Media/Deploy-Windows-7-The-Easy-Way-Using-WDS-MDT-and-AIK-Step-By-Step/
http://www.the-d-spot.org/wordpress/2009/11/01/windows-7-lite-touch-installation-with-mdt-2010/
http://www.the-d-spot.org/wordpress/2009/11/16/windows-7-lite-touch-installation-with-mdt-2010-part-2/
http://www.cluberti.com/blog/2009/08/10/mdt-2010-and-deployment-from-a-usb-key/
http://www.cluberti.com/blog/2009/08/12/adding-additional-boot-options-to-your-deployment-usb-key/
http://www.delltechcenter.com/page/Dell+Business+Client+Operating+System+Deployment+-+The+.CAB+Files
http://driverpacks.net/
Capture and Apply Windows Images
Apply Images by Using ImageX
BCDboot Command-Line Options
Deploy a System Recovery Image
http://mikespcbabble.com/WinPE3.aspx
http://blog.brianleejackson.com/sysprep-a-windows-7-machine-start-to-finish-v2
http://www.windowsnetworking.com/articles_tutorials/Deploying-Windows-7-Part19.html
http://blog.brianleejackson.com/formatting-winpe-3-0-usb-flash-drive-dism
http://edge.technet.com/Media/Deploy-Windows-7-The-Easy-Way-Using-WDS-MDT-and-AIK-Step-By-Step/
http://www.the-d-spot.org/wordpress/2009/11/01/windows-7-lite-touch-installation-with-mdt-2010/
http://www.the-d-spot.org/wordpress/2009/11/16/windows-7-lite-touch-installation-with-mdt-2010-part-2/
http://www.cluberti.com/blog/2009/08/10/mdt-2010-and-deployment-from-a-usb-key/
http://www.cluberti.com/blog/2009/08/12/adding-additional-boot-options-to-your-deployment-usb-key/
http://www.delltechcenter.com/page/Dell+Business+Client+Operating+System+Deployment+-+The+.CAB+Files
http://driverpacks.net/
Thursday, September 2, 2010
How to delete files older than x days in Linux
To delete files older than 30 days in folder /home/user/path enter the command:
find /home/user/path -mtime +30 -exec rm {} \;
To delete also subdirectories enter the command:
find /home/user/path -mtime +30 -exec rm -rf {} \;
find /home/user/path -mtime +30 -exec rm {} \;
To delete also subdirectories enter the command:
find /home/user/path -mtime +30 -exec rm -rf {} \;
Subscribe to:
Posts (Atom)