Sometimes we meet trouble in disk capacity. If we work within CLI, how do we know which files had the biggest size? Today, those kind of troubles won't be exist any longer. Just type the ls command with -h option.
Example, I want to check the files inside the /var directory. I just type the command below.
ls -lsah /var
I you confuse, just type man ls.
Fuh.. After installing OpenSuse 11 at my computer now I had to HP LaserJet 1020 printer driver installed. First download the driver at
sourceforge. It seems OK since all of HP printer tipes could be detected with this hplip diver. But now I got a new problem how to install run file I've had.
It's said that You just run it like common script. So I tried this command
./hplip-2.8.6.runBut... Why it doesn't work???
I thought a little bit and..
Upszz... I've forgotte to do this one before =P.
chmod +x hplip-2.8.6.run
You can use command
df -h
to check how many disk space left.
du -h
To check how many size of file and folder.
Now, how does we know which file or folder uses the most space. Just type the command below
du -xskch * | sort -rn | head -n 10
In Windows, we can go to task manager and kill unresponding proccess. How did we do in linux? Is there a task manager? Let's find the answer here.
find PID
First time to know is Proccess ID, that is number given to running proccess. Give this command to your shell something like this.
# ps -aux | grep opera
You'll get result like this
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
502 3815 2.1 37.9 168372 94132 ? S 12:36 5:50 /usr/lib/opera/9.24/opera -style klearlook
502 3828 0.0 0.2 2656 592 ? S 12:36 0:00 /usr/lib/opera/plugins/operaplugincleaner 3815
502 4227 6.2 7.2 50476 18060 ? SNl 16:58 0:14 /usr/lib/opera/plugins/operapluginwrapper 19 23 /usr/lib/mozilla/plugins/libflashplayer.so
root 4237 0.0 0.3 2952 792 pts/2 S+ 17:01 0:00 grep --color opera
The PID is in italic. And to kill the process is just give the command below:
# kill -9 4237
The option -9 is special kill the proccess.
Since yesterday my flash disk error. My Windows can't detect it properly. So I couldn't format it. Then I plug it into my PClos, even the flash can't be detected too at least I still can format it.
Don't worry, in Linux we can format with fat32 file system. So it still can be read in Windows. Here is the command to format using fat32:
mkfs.vfat /dev/sda1
Finally I am thinking about this,
Why Windows could't do that??
Or Was Linux "too" good, than ...??
:P
There's many effect related to disk capacity, so you need to know about it. Problem that usually occur is:
1. /home full, user except root can't login.
2. /var full, your program can't runs and there wouldn't be logs.
Just type this command
df -h
And waste your unusefull files.
The easiest way to look for file(s) in Linux we can use command locate. Just simply type locate (file you want to)
example:
locate http
You can combine with grep, so you can find files more specific.
locate http | grep etc
It will find all of files named http in directory etc.
For using locate, you need to make index firts with command updatedb. The complete command will be.
updatedb
locate http | grep etc
Run Level is a mode of operation in one of the computer. There's six type or mode of operation in Linux. The configuration system allows you to choose one of them at once.
The Options0 - Halt
1 - Single user
2 - Not used/User definable
3 - Full multi-user, console logins only
4 - Not used/User definable
5 - Full multi-user, with display manager as well as console logins
6 - Reboot
The commandinit(space)(number of the options above)
Example, I want to change from GUI to text mode. So I should type on the console/terminal:
init 3You had to be root to do this command.
This way absolutely usefull to fix Linux configuration system, like
my post before.
Just type the command below on your beloved shell. And see the result.
ps -aux | sort +4n
Wanna mount a windows directory to? Just try this command.
smbmount //windowsserver/directory /mount-point -o username=windowsusername,password=windowspassword