Tuesday, February 21, 2012

How to copy file with the directory structure?

cp command has a --parents option which will automatically create the source directory structure at the destination.

$ pwd
$ ls
dir1 dir2 dir3 dest_dir
$ ls dir1

Following command will create the folder structure dir1/a inside dest_dir and copy the file.txt into it.

$ cp --parents dir1/a/file.txt dest_dir

Saturday, February 4, 2012

How to view filesystem information in Linux Terminal?

Use command...

df -h

-h : list in human readable format.

How to view hard disk information in Linux terminal?

use command...

sudo fdisk -l

l (el) : list

How to control sound from Linux terminal?

ALSA (Advanced Linux Sound Architecture) acts as the sound driver of many Linux distros. Its mixer can be used to control sound by typing the command alsamixer

Thursday, February 2, 2012

How to switch to the last worked directory in linux?

use command...

cd -

How to set the date in Linux using the terminal?

One way to do it is by using the format: "DD MON YYYY 24hh:mm:ss" with date command.

e.g. sudo date -s "02 FEB 2012 20:37:00"

How to get rid of Samsung Galaxy Ace's wifi connection hanging issue?

Galaxy Ace's Wifi connection hangs when the phone is left idle for about 15 min.

Wifi Sleep Policy must be changed to stop it.

Go to settings -> Wireless & networks -> Wi-Fi settings -> Advanced -> Wi-Fi sleep policy -> Select option "Never".

How to enable auto mounting and write capability of NTFS partitions in Ubuntu 11.10?

Install NTFS Configuration Tool (ntfs-config) from the Software Center.  By using this we can make NTFS partitions writeable. This will also make them mount automatically.

NTFS-3g driver is used to make this possible.

The alternative - Storage Device Manager (pysdm), which used to work in Karmic if my memory serves right - doesn't work properly in Ubuntu 11.10.