Sunday, February 6, 2011

More Useful Linux Commands

More useful commands: Mount a filesystem in ubuntu: 1. Make all the folders shared in windows. 2. sudo mkdir -p /media/c 3. sudo fdisk -l 4. sudo mount -t ntfs -o nls=utf8,umask=0222 /dev/sda3 /media/c To display the logs on termnial: 1. ./startup.sh && tail -f ../logs/catalina.out >catalina.out (to truncate the file) mv rmdir rm -R (delete with contents) netstat -an | grep "LISTEN " to check which all ports are listening. iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 8080 -j ACCEPT (if ubuntu is behind firewall) command to check whether the port is firewalled/ blocked netcat -nvlp and in the second give the command netcat -nv 192.168.1.35 To know the process running on the port sudo netstat -plntu|grep "8080" ps -A -- to get list of process running ps -aux kill a process sudo kill -9 pidd To get the ip address /sbin/ifconfig

No comments:

Post a Comment