Showing posts with label CLI. Show all posts
Showing posts with label CLI. Show all posts

Sunday, April 27, 2014

Changing date and time in Crunchbang Linux using Terminal

It sometimes is really handy when you don't want to waste your time searching for the 'option' or interface that will allow you to change the time of your PC. Source [ http://debmintux.wordpress.com/2010/03/29/crunchbang-set-the-time-via-terminal-cli/ ]
Set the date:
sudo date --set 2010-01-28

Set the time:
sudo date --set 21:08:00

I didn't have to do this but just in case
Restart Tint2 to see the correct time:
sudo killall tint2
tint2 &

Saturday, November 02, 2013

Convert images and apply various effects on them using the command line

One thing is for sure, something so beautiful as Linux needs exploring. You can't expect anyone to trully show it's virtues that might come in handy to you. Everybody has their own cut, you have to do your.
So this other minute I was looking for some cheatsheet wallpaper to put up on my Desktop. Got a lot of them. Chose one, but the images is Black text on white backgroud, a serious problem to a maniac like me. Figured it needs some invertion, but firing up GIMP for such trivial task? :/ After a bit of drooling on ideas, Imagemagick hit my mind. One of the best tools for batch processing of images using the terminal. To install, type in:
sudo apt-get install imagemagick
There are many many options and things that can be done using this gem, cropping, resizing, inverting, even combining multiple effects. Some example commands are listed below
# Change format
convert howtogeek.png howtogeek.jpg

# Enforcing compression level
convert howtogeek.png -quality 95 howtogeek.jpg

# Resizing
convert example.png -resize 200×100 example.png
# enforce specification
convert example.png -resize 200×100! example.png
# maintain ratio
convert example.png -resize 200 example.png
# or 
convert example.png -resize x100 example.png

# Rotation
convert howtogeek.jpg -rotate 90 howtogeek-rotated.jpg

# Effects
# charcoal
convert howtogeek.jpg -charcoal 2 howtogeek-charcoal.jpg
# implode
convert howtogeek.jpg -implode 1 howtogeek-imploded.jpg
# invert
convert howtogeek.jpg -negate imploded.jpg

# Combination
convert howtogeek.png -resize 400×400 -rotate 180 -charcoal 4 -quality 95 howtogeek.jpg
You should explore the endless possibilities yourself.
NOTE: The commands have been copied from www.howtogeek.com

Saturday, October 26, 2013

Linux shell cheatsheet (Can it become one?)

I love the command line, the CLI. I wish somethings were a little bit different allowing me to use CLI for every task, but the world is a cruel place, apart from stupid M$ mistakes regarding their crappy GUI. You do realize there wouldn't be such a crappy product without dependency on the GUI, right?
I'm not categorizing it right now, because there's not much to categorize actually
Show line number in "grep" output: grep "text" -n

Connect Rapoo MT750S with Linux (Tested on Manjaro)

 I bought this obvious copy of MX Master 2S in hopes of having the device switching functionality along with a lightweight body because I ha...