Quantcast
Channel: Developer Feed - Unix
Browsing latest articles
Browse All 10 View Live

How do you display last part of file in Unix?

NAME     tail -- display the last part of a fileSYNOPSIS     tail [-F | -f | -r] [-q] [-b number | -c number | -n number] [file ...]DESCRIPTION     The tail utility displays the contents of file or, by...

View Article


How to sort the directories based on their sizes?

SolutionUse the du command with the sort command as $ du -s * | sort -rn747624    work23856    cards7040    postie680    convert120    thumbsThis will list the the size in bytes for the directories in...

View Article

How to find a list of files greater than a given size in Unix?

SolutionUse the find command with ls command to find a list of file in the current directory that are over 1000k or 1MB  find . -size +1000k -print0 | xargs -0 ls -lShOutputread more

View Article

How to find out the DNS servers IP address in Unix?

AnswerIn order to find the DNS server address type following command as shell prompt:$ cat /etc/resolv.confOR$ less /etc/resolv.confOutputdomain hsd1.ca.comcast.net.nameserver 192.168.0.1

View Article

Warning: mysql_connect(): [2002] No such file or directory

IssueWarning: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Users/Mvohra/Sites/projects/webservices/apps/functions.php on line 8Warning:...

View Article


Warning: mysql_connect(): [2002] No such file or directory

IssueWarning: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Users/Mvohra/Sites/projects/webservices/apps/functions.php on line 8Warning:...

View Article

How perform global search and replace in vi?

SolutionUse the following command for global search & replace in the file::%s/search_string/replacement_string/gThis command tells vi to scan all lines in the file for search_string and change it...

View Article

How does a typical standalone Java program shell script look like?

#!/bin/shecho "########################################################"echo "Sample Run Script"echo "Copyright reserved Developerfeed.com@2010-2012!"echo...

View Article


How do you find about the system architecture of your Unix like machine?

AnswerRun the uname  command via the terminal and see the outputread more

View Article


How to check if a port is open using Terminal in Unix?

There a couple of ways to find out.1) Using telnet to find if port is open on a remote/localhost using the command as:telnet hostname portnumberIf a port is open then there would be some output on the...

View Article
Browsing latest articles
Browse All 10 View Live