Maven mvn -Dmaven.test.skip=true -e clean install mvn clean install mvn clean install -Dmaven.test.skip=true Linux: telnet mq.dev.sum.org 9012 telnet <machine_IP> <port> Sudo su Su - sudo -u dev2adm -i ps -ef|grep jboss Find a folder Just find directories and skip file names pass the -type d option as follows: find / - type d -name "apt" - ls locate httpdocs Delete latest 3 files: rm -f $(ls -1t ./ | head -3) working fine ls -d -1tr /path/to/folder/* | head -n -10 | xargs -d '\n' rm -f rm -f $(ls -1t ./ | tail -n +4) netstat -ln | grep '80 ' | grep 'LISTEN' netstat -atnp|grep LISTEN netstat -ln | grep '99 ' | grep 'LISTEN' netstat -ln | grep '16' scp -pr Services-0.0.2-SNAPSHOT.war sbiswas@172.1.8.141:/home/sbiswas tail -f /tmp/Liferay-JBoss.out |grep 'PAGENAME\|tabName' grep 'PAGENAME\|tabName' for multiple se...
Delete 10 newest files in Linux The code you'd want to include in your script is rm -f $(ls -1t /path/to/your/logs/ | tail -n +11) The -1 (numeric one) option prints each file on a single line, to be safe. The -f option to rm tells it to ignore non-existent files for when ls returns nothing. Or use the below command ls -d -1tr /path/to/folder/* | head -n -10 | xargs -d '\n' rm -f Delete latest 3 files: rm -f $(ls -1t ./ | head -3) Find a folder Just find directories and skip file names pass the -type d option as follows: find / - type d -name "apt" - ls locate httpdocs Gives the time stamp date +%Y%m%d -s "20081128" date +%T -s "11:18:00" Stat file.txt newest=$(find subdir -newer timestamp -printf "%A%p\n" | sort -n | ...