Archive for Linux

Rename multiple files~ How to install your public key in the remote machine’s authorized_keys~ How to redirect stderr and stdout in Bash~ ssh local tunneling – access home from remote location~ Run one process (or more) into tmux~ Regexp hints~ Why is it modern to be non-Java? Java have a high reputation for being solid and scalable in large enterprise solutions~ How to add speaker notes to reveal~ How do I access variables from the main class from another class (java)?~ How to resize a VirtualBox vmdk file~ How to Delete Auto Backup Photos without a plugin.~ Get the list of the tables in Oracle~ SpinRite~ Varnish~ Set Gmail as Your Browser’s Default Email Client with a Simple Hack~ Booting Operating System from USB Drive in VMware Fusion 3.x~ Add Quick Launch to Taskbar~ How to add Tumblr to your Google Buzz feed~ Export CSV with custom delimiter~ How to Install Windows 7 from USB Flash Drive~ Google G1 MMS / Internet settings. Vodafone UK~ Magento installation problem “innoDB storage engine is not supported”~ Connect Google Talk to AIM, MSN, & Yahoo~ Security Master Code For Nokia~ HDR Bracketing with the D90~ MarkerClusterer with custom icons and data from a XML file.~ Chrooting SFTP users in Ubuntu 9.10~ How to create a chroot ssh user in Ubuntu~ Import Excel Data into MySQL in 5 Easy Steps~ XPS 1530 – How to boot ubuntu using MediaDirect Button and windows 7 with the power button~ Google Bookmark don’t load with Firefox on Ubuntu~ Google Chat Video doesn’t install…~ How to Protect Your Wi-Fi Network from the WPA Hack~
Rename multiple files

Rename multiple files

for filename in *.jpg; do newname=echo $filename | sed ‘s/xxx/yyy/g’; mv $filename $newname; done

Continue reading →

How to disable password authentication for SSH

How to disable password authentication for SSH

In file /etc/ssh/sshd_config Uncomment the second line, and, if needed, change yes to no. Then run

Continue reading →

Mount encrypted volumes from command line with Luks

Mount encrypted volumes from command line with Luks

Your volume is probably encrypted with LUKS, here’s how to mount it: You need: sudo apt-get install cryptsetup To decrypt the volume: sudo cryptsetup luksOpen /dev/sda1 my_encrypted_volume Now you can mount it as usual: sudo mkdir /media/my_device sudo mount /dev/mapper/my_encrypted_volume /media/my_device To lock the container…

Continue reading →

How to mount a HFS partition in Ubuntu as Read/Write?

How to mount a HFS partition in Ubuntu as Read/Write?

First, make sure that you have hfsprogs installed. Example installation command: Next, mount or remount the HFS+ drive; commands need to be as follows: Finally, if the drive was improperly unmounted or has otherwise become partially corrupted run fsck.hfsplus (provided here by Jayson) as such:

Continue reading →

Change extension to multiple files

Change extension to multiple files

for i in *.pdf; do mv $i ${i/pdf/jpg}; done

Continue reading →

How to take MySql dump (backups)

How to take MySql dump (backups)

mysqldump –add-drop-table -a -u username -p database | gzip > prod-db-dump.sql.gz Note: The password is not passed to the command line, but it will asked at the prompt

Continue reading →

Preserve bash history in multiple terminals

Preserve bash history in multiple terminals

dd the following to ~/.bashrc # Avoid duplicates export HISTCONTROL=ignoredups:erasedups # When the shell exits, append to the history file instead of overwriting it shopt -s histappend # After each command, append to the history file and reread it export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history…

Continue reading →

How to take mysql dump

How to take mysql dump

mysqldump –add-drop-table -a -u <user> -p <dbname> | gzip > db-dump.sql.gz

Continue reading →

Run one process (or more) into tmux

Run one process (or more) into tmux

Let’s say you need to run a process like a lightweight private npm proxy registry such as Verdaccio and you do not want to use a Docker container. You can run a simple command as noup verdaccio & . It might happen that the process…

Continue reading →

Check DNS nameservers information about host addresses

Check DNS nameservers information about host addresses

You might want to find information about a particular domain and check where it is hosted. i.e.: You could have a domain hosted by Godaddy and have your MX record hosted somewhere else. In this case with Dig command you can check where the DNS…

Continue reading →

Page 1 of 6 1 2 3 4 5 ... Last →