rɑːdʒɑ
  • Member for 9 years, 8 months
  • Last seen this week
How to display meminfo in megabytes in top?
62 votes

You can also use htop. It's much cooler than top. If you are using Debian or one of its derivatives, then you can install it using sudo apt-get install htop. Edit: Here is a screenshot with a better ...

View answer
Harddisk serial number from terminal?
11 votes

By using hdparm you can see your Harddisk serial number from terminal. Open your terminal and type as hdparm -I /dev/sd?|grep -E "Number|/dev"

View answer
Are kernel threads processes and daemons?
10 votes

First : Credit goes https://stackoverflow.com/questions/15983872/difference-between-user-level-and-kernel-supported-threads User threads and Kernel threads are exactly the same. (You can see by ...

View answer
What happens if I use vi on large files?
Accepted answer
9 votes

The default directory (/var/tmp) for the vi editing buffer needs space equal to roughly twice the size of the file with which you are working, because vi uses the extra lines for buffer manipulation. ...

View answer
How call a function inside another function
8 votes

android@localhost:~/test$ cat fun.sh function myname { echo "my name is raja" } function call { myname } call

View answer
Shell program which reads line and output lines with the line numbers
8 votes

Have you tried nl -b a <file_name> debian@virt00:~/test$ nl -b a file 1 abcdef 2 ghi 3 4 klm 5 nopqr st debian@virt00:~/test$ nl stands for number line -b flag ...

View answer
NFS mount with fstab vs autofs
Accepted answer
7 votes

Autofs , is auto mounting filesystem on demand like when ever you need it. NFS is like mounting a complete partition remotely and you will have availability of whole content of the partition. But ...

View answer
Duplicates in bash history
Accepted answer
4 votes

No need of erasedups as you are already giving ignoreboth. Ignoreboth will take care of duplicates and white space commands. Just try only ignoreboth or erase dups. "HISTCONTROL=ignoreboth" Use ...

View answer
check internet speed from terminal?
Accepted answer
4 votes

you can do it, open your terminal and type as wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py chmod +x speedtest-cli ./speedtest-cli For ...

View answer
How do I sync files between two drives?
3 votes

You can also use Lsyncd.It will monitor continuously your mentioned directory tree and when changes happened it will automatically apply the changes. It is actually similar to Rsync. You can use it ...

View answer
How to disable SFTP for a user, but keep FTP enabled
Accepted answer
3 votes

First point , FTP and SFTP both are different. FTP normal file transfer protocol but SFTP is secure file transfer protocol and this service is from SSH not a stand alone service. If you want to ...

View answer
prevent apt* from downloading behind my back
3 votes

It's possibly due to the unattended-upgrades configuration in your Debian system. unattended-upgrades has been introduced to keep your system up-to-date with respect to security and other updates. ...

View answer
How to set up a localhost server with http protocol on apache
Accepted answer
3 votes

How to setup localhost server with http protocol on apache? Its depends upon the OS you are using. if you are using Ubuntu sudo apt-get install apache2 if you are using CentOS/Redhat sudo yum install ...

View answer
cannot move file because of & in name
3 votes

One more way , use escape character mv file\&filename any That will rename file&filename named file into any name.

View answer
host can't ssh guest, but guest can
2 votes

Check List: Are you able to Ping Slave-1 ? Slave-1 IPtables have allowed SSH port ? Stop IPTables and try once. service iptables stop Slave-1 is having SSH service running or not ? If yes try ...

View answer
where can I find the disk latency using iostat ( await, svctm, %util )?
2 votes

You can use sar command. root@virt01:~# sar 1 1 Linux 3.19.0-42-generic (virt01.ubuntu.com) 13/02/16 _x86_64_ (1 CPU) 12:19:55 CPU %user %nice %system %iowait ...

View answer
useradd on CentOS with home directory and sudo privileges
Accepted answer
2 votes

You can use -G For CentOS Doc -G<group-list> List of additional (other than default) group names or group numbers, separated by commas, of which the user is a member. The ...

View answer
what is exact meaning smtp_receive_timeout in exim.conf?
2 votes

smtp_receive_timeout Use: main Type: time Default: 5m This sets a timeout value for SMTP reception. It applies to all forms of SMTP input, including batch SMTP. If a line of input (either an ...

View answer
Are background jobs and foreground jobs always in running state?
2 votes

Background Job : A job which is running background in the same shell. You can use bg command to see any background jobs. Foreground job : A Job which is running in the same shell right before your ...

View answer
Where is the log for ACPI events?
2 votes

All the log record during the ACPI events will be recorded at /var/log/acpid.log Open your terminal and type as tail -f /var/log/acpi.log that will lists you content of ACPI log file. hope ...

View answer
Error: install exited abnormally [1/1] while installing CentOS-5.4
1 votes

Hey below command I am using from 2 years. Do it as root user # dd if=/path/to/iso of=/dev/sdX bs=4M ; sync And it worked everytime. Note: At the time of installation if you are dropping to ...

View answer
NAS attached with fstab
1 votes

After some research I came to know its not NAT issue. It's with Plex media server. Access Plex media server Web interface and see at advanced settings. You will have option to set media share refresh ...

View answer
Why non-number record shows after "0" in sorting?
1 votes

you can use -g -g, --general-numeric-sort compare according to general numerical value root@virt01-ubuntu:~# ls | sort -t. -k1g a.txt 0.txt 1.txt 2.txt 3.txt root@virt01-ubuntu:~#

View answer
Change a string with sed
Accepted answer
1 votes

Finally virt01@virt01:~$ sed 's/_0*$/_00001/g' some.txt somestring_oooo_00001 somestring_oooo_00001 somestring_oooo_00001 virt01@virt01:~$ Exactly for your data virt01@virt01:~$ cat some.txt ...

View answer
How can I extract the words between two strings in shell script
1 votes

Same can be achieve with grep & Perl Regex. $ echo "$mySTring" | grep -Po "Summary: \K(.*)(?= Arrived )" New Arrival \K: grep will keep everything before \K in matching the pattern but ...

View answer
sed string path change
Accepted answer
1 votes

How about just replacing beginning /.. with blank. echo "/../path/file.extension" | sed 's|/..||'

View answer
How to calculate the number of vcores on a Linux machine
1 votes

If you have 32 CPU Cores assigned to your Linux machine and each core have 2 threads then you would be having 64 Threads but not 64 cores. Generally one core can run only thread at a time but these ...

View answer
redis hvals: get return as array structure
1 votes

If command redis -h host -a password -p port HVALS myhash can return result as each entry separated by <space> then you can use arrays. hash_array=($(redis -h host -a password -p port HVALS ...

View answer
How to search my email containing some string in email'content?
1 votes

If you install package: maildir-utils. You can search Emails. mu find Alice Bob Will search all Emails, with words Alice and Bob at every field. Man-Page: https://manpages.debian.org/jessie/...

View answer
How to read stdout from script run by system?
1 votes

As you already mentioned , you have an echo statement in your script. Now edit your script and this like at the beginning of the file after shebang. > /tmp/myoutput myoutput is just a filename ...

View answer