Posts in category nixCraft : FreeBSD
scp: Do not Overwrite Existing File O...
I am a new Linux user. I use scp to upload files to net-storage provided CDN company. I do not want to overwrite the existing files. How can I prevent overwriting of files when using scp command under Linux, Mac OS X or Unix like operating systems?Read answer to: \"scp: Do not Overwrite Existing File On Linux or (Read more...)
Vi / Vim: Wipe and Undo All Changes S...
I am a new vi / vim text editor user and I know how to quit without saving changes. What if I want to wipe out all of the edits I have made in a session and get back to the original file? How do I wipe all changes since opening a file?Read answer to: \"Vi / Vim: (Read more...)
SSH: WARNING: UNPROTECTED PRIVATE KEY...
I\'m setting up server on an Amazon EC2 compute instance powered by Suse Enterprise Linux server. I am using the following command to login into the my EC2 compute from OS X/Ubuntu desktop: ssh -i suse-ec2-server-jp.pem root@ec2-xx-yy-zzz-yyy.compute-1.amazonaws.comI am getting the following error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [...]
Linux / Unix Bash Shell List All Buil...
Builtin commands are contained within the bash shell itself. How do I list all bash builtin commands under Linux / Apple OS X / *BSD / Unix like operating systems without reading large bash man page?Read answer to: \"Linux / Unix Bash Shell List All Builtin Commands\"
Linux / Unix Find Command: Avoid Perm...
When I type find . -type d -name \"foo\" command I get Permission denied error messages. How do I exclude all \"permission denied: messages from the find command under Linux or Unix like operating systems?Read answer to: \"Linux / Unix Find Command: Avoid Permission Denied Messages\"
HowTo: Use pwd Command In Linux / UNI...
How do I use the pwd command in Linux or Unix like operating systems? How can I use pwd command in UNIX or Linux shell scripts for automation purpose?Read answer to: \"HowTo: Use pwd Command In Linux / UNIX\"
Vi / Vim: Save And Quit The Editor Co...
I am a new vi (vim) text editor user. How do I quit the vi editor and save my changes under Linux or Unix like operating systems?Read answer to: \"Vi / Vim: Save And Quit The Editor Command\"
Linux/Unix: Cat Command Display Line ...
How do I use the cat command to display the line numbers for a file called myapp.c under Linux or Unix like operating systems?Read answer to: \"Linux/Unix: Cat Command Display Line Numbers\"
Vi / Vim: Quit Without Saving Command
I am a new vi / vim text editor user. How can I quit the vi / vim text editor without saving my changes to a file under Linux / Unix like operating systems?Read answer to: \"Vi / Vim: Quit Without Saving Command\"
Squid Proxy Server Change Outgoing IP...
I have Squid caching proxy server deployed on Rackspace based server in UK. This server has four IP address. I would like to change outgoing IP addresses from default 1.2.3.1 to 1.2.3.4. How do I change proxy server outgoing IP address under Linux or Unix operating systems?Read answer to: \"Squid Proxy Server Change Outgoing IP Address\" &nbs [...]
MySQL Server: Bind To Multiple IP Add...
I have MySQL database system running on FreeBSD. The server has multiple ip address. The mysqld used by many websites hosted on two other CentOS based servers. I would like to bind MySQL sever running on Unix / Linux server to more than one IP address such as 202.54.1.2, 202.54.1.10, and 202.54.1.15. How can I bind mysqld to multiple ips? (Re [...]
Linux / Unix: Unicode and HTML Charac...
I need to replace special characters with equivalent hexadecimal unicode under Linux or Unix like operating system. How do I list or find out unicodes for given characters?Read answer to: \"Linux / Unix: Unicode and HTML Characters Lookup By Name or Number\"
Fix: VIM UP and Down Keys Inserting A...
I am login to a remote server using a ssh client. I am annoyed with the arrow key behavior during insert mode in Vim. As soon as I hit arrow keys, vim display A B C D on screen. How do I fix this problem under Unix like operating systems?Read answer to: \"Fix: VIM UP and Down Keys (Read more...)
Linux / Unix: Rsync Copy Hidden Dot F...
How do I use the rsync tool to copy only the hidden files and directory (such as ~/.ssh/, ~/.foo, and so on) from /home/jobs directory to the /mnt/usb directory under Unix like operating system?Read answer to: \"Linux / Unix: Rsync Copy Hidden Dot Files and Directories Only\"
Linux / Unix: sed Command Print Only ...
I see many examples and man pages on how to do operations like search-and-replace using sed. But, I want to match a given string or a regular pattern expression and display on the screen. How do I print lines with matching pattern using sed command only under Unix like operating systems?Read answer to: \"Linux / Unix: sed Command (Read more [...]
Linux / Unix: Find Out DNS Server IP ...
How do I find out my DNS server IP address assiged my my ISP under Unix or Linux operating system using command prompt? How do I find preferred dns server under Debian / Ubuntu / Fedora Linux desktop system?Read answer to: \"Linux / Unix: Find Out DNS Server IP Address / Names\"
Bash History: Correct / Repeat The La...
I often type the wrong command as follows under Linux bash shell: rsync -av dir1 user@server1.cyberciti.biz:/path/to/dir1 OR cp -av file1*.txt file2*.txt /path/to/dest I need to correct those command as follows: rsync -av dir5 user@server1.cyberciti.biz:/path/to/dir1
cp -av delta1*.txt delta2*.txt /path/to/dest How do I replace dir1 with dir [...]
Linux / Unix: lftp Command Mirror Fil...
How do I mirror files from remote ftp server using lftp command? How do put the entier directory from a local disk to a remote ftp server (reverse mirror) using lftp command under Linux and Unix like operating systems?Read answer to: \"Linux / Unix: lftp Command Mirror Files and Directories\"
PHP: Require_once(): Unable To Alloca...
I\'m running PHP version 5.3.3 on CentOS / RHEL 6.x with APC php-pecl-apc-3.1.9. However, I\'m getting the following warnings in my php server log file:[01-Jul-2012 10:50:49] PHP Warning: require_once(): Unable to allocate memory for pool. in /var/www/html/includes/admin.php on line 57
[18-Jul-2012 17:00:08] PHP Warning: include_once(): Un [...]
Linux / Unix: Rsync Resume Partially ...
I know wget command can resume downloads. H>ow do I resume partially transferred files using rsync command line under Unix like operating systems?Read answer to: \"Linux / Unix: Rsync Resume Partially Downloaded Files\"