Archive for Linux - page 4

Rename multiple files~ How to disable password authentication for SSH~ Mount encrypted volumes from command line with Luks~ How to mount a HFS partition in Ubuntu as Read/Write?~ Change extension to multiple files~ How to take MySql dump (backups)~ Preserve bash history in multiple terminals~ How to take mysql dump~ Run one process (or more) into tmux~ Check DNS nameservers information about host addresses~ How to purge the cache of a page~ Checking the Validity Date of an SSL Certificate~ How to restart network interface~ How can I monitor the memory usage?~ Default max heap size~ How to convert the ^M linebreak to ‘normal’ linebreak in a file opened in vim?~ find difference between two text files with one item per line~ how to extract the first and the last x lines of a big file~ How to remove the ^M return character on Linux~ Find difference between two text files with one item per line~ How to check git changes~ How to list all users in ubuntu/linux~ Bash: Match a word in a string and return the word preceding it~ Delete all files in a folder which don’t match file extensions~ Check space in a disk~ wget – how to mirror only a section of a website~ Move files older than 30 days in current folder to~ How to generate a secure random password~ How to retrieve Perforce password.~ How to get your online secret key directly to your terminal without saving it.~ The request to Suspend this virtual machine failed because the corresponding VMware Tools script did not run successfully.~ BASH Rename all file in a directory~ How can I edit the welcome message when ssh start?~ Find text including subdirectories in ubuntu~ Install the JDK on Ubuntu server~ Copy files with progress bar on terminal~ Decrypt file encrypted with old/primary master key~ How to remove the private master key from your laptop.~ my minimum dot bashrc file~ Add and append text to a file~ Network Connections and network protocol statistics – netstat~ Bash: TAB completion to be case-insensitive~ Get a list of all the cron jobs on a Debian based system~ Why use 64bit?~ Fork bomb~ Sniffing network packages – tcpdump~ Update the timezone~ How to install Java 6 on Ubuntu 12.04~ Search for a specific string inside a directory matching the files’ name~ Re-build the keyboard setting~ Size of a directory~ New IP~ Search for a file in a specific folder matching a string~ Resolve UTF-8 issue in Linux Console~ Untar a file/folder~ Linux basic command: cat, replace, redirect stdout to a file~ SSH Public Key Based Authentication — Howto~
The request to Suspend this virtual machine failed because the corresponding VMware Tools script did not run successfully.

The request to Suspend this virtual machine failed because the corresponding VMware Tools script did not run successfully.

Edit /etc/vmware-tools/scripts/vmware/network @@ -78,13 +78,13 @@ run_network_script() [ "$script" != "error" ] || Panic "Cannot find system networking script." # Using SysV "service" if it exists, otherwise fall back to run the script directly – service=`which service 2>/dev/null` – if [ $? = 0 -a…

Continue reading →

BASH Rename all file in a directory

BASH Rename all file in a directory

for file in *.png;do mv "$file" "${file/_h.png/_half.png}"; done Another use case: foo=” ” # replace first blank only bar=${foo/ /.} # replace all blanks bar=${foo// /.}

Continue reading →

How can I edit the welcome message when ssh start?

How can I edit the welcome message when ssh start?

By default, /etc/motd is a link to /var/run/motd which gets reset every time you login. To make permanent changes you need to remove the link first then change the content of /etc/motd. sudo rm /etc/motd sudo nano /etc/motd

Continue reading →

Find text including subdirectories in ubuntu

Find text including subdirectories in ubuntu

grep -rl "string" /path find . -name "*.jar" | xargs grep Topic locate try.txt | xargs grep hello The methods serve different purposes. recursive search and replace old with new string, inside files $ grep -rl oldstring . |xargs sed -i -e 's/oldstring/newstring/' find ….

Continue reading →

Install the JDK on Ubuntu server

Install the JDK on Ubuntu server

Install the JDK Download he 32bit or 64bit Linux “compressed binary file” – it has a “.tar.gz” file extension i.e. “[java-version]-i586.tar.gz” for 32bit and “[java-version]-x64.tar.gz” for 64bit Uncompress it tar -xvf jdk-7u2-linux-i586.tar.gz (32bit) tar -xvf jdk-7u2-linux-x64.tar.gz (64bit) JDK 7 package is extracted into ./jdk.1.7.0_02 directory….

Continue reading →

Copy files with progress bar on terminal

Copy files with progress bar on terminal

rsync -avP source dest

Continue reading →

Decrypt file encrypted with old/primary master key

Decrypt file encrypted with old/primary master key

Now, what if you need to decrypt a file that has been encrypted for your old master key, or you have create a subkey, moved away the primary key, do everything with your subkey, but still you need the primary key to sign, create new…

Continue reading →

How to remove the private master key from your laptop.

How to remove the private master key from your laptop.

These instructions assume you use one computer, and keep the master keys on an encrypted USB flash drive, or preferably at least two (you should keep backups of your secret keys). Here comes the tricky part. You need to remove the private master key, and…

Continue reading →

my minimum dot bashrc file

my minimum dot bashrc file

Here is one of the few minimum configurations I like to have on my personal .bashrc file export PS1="\[\033[0;36m\]{\[\033[0;50m\]\w/\[\033[0;36m\]} \[\033[0;32m\]what now… \[\033[0;39m\]" Ok, mac doesn’t have a proper root user, but I often run 2 virtual machines at the same times and one of them…

Continue reading →

Add and append text to a file

Add and append text to a file

There are different ways, I like is: echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn append text to a file echo "ServerName localhost-appended" | sudo tee -a /etc/apache2/conf.d/fqdn

Continue reading →

Page 4 of 6 ← First ... 2 3 4 5 6