Search for a software/package to install using apt-cache
Answer:
To search for a software/package to install under Debian/Ubuntu is easy with apt-cache
# sudo apt-cache search php5-xdebug
php5-xdebug - Xdebug Module for PHP 5
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Search for a software/package to install using apt-cache
Answer:
To search for a software/package to install under Debian/Ubuntu is easy with apt-cache
# sudo apt-cache search php5-xdebug
php5-xdebug - Xdebug Module for PHP 5
Create a directory tree in Linux
Answer:
To create a directory tree, no matter if parent directories exist or not, e.g. /data/project/backup
# mkdir -p /data/project/backup
Install sysstat for basic system monitoring
Answer:
sysstat is a very useful and minimal tool for basic system resources monitoring, e.g. system load average, memory usage, I/O utilization etc.
To install in Ubuntu,
# sudo apt-get install sysstat
To configure sysstat so it run continuously (as cron)
# sudo dpkg-reconfigure sysstat
Wait sometimes and try the following commands to see the collected statistics,
E.g.
1. Check system load average
# sar -q
2. Check memory usage
# sar -r
For more options,
# man sar
Rename file in Linux
Answer
The easiest way to rename a file in Linux is to move the file, using the mv command.
e.g.
# mv old_file.txt new_file.txt
Copy a directory (for backup) to another location
Answer
To copy a directory to another location, for backup purpose, you can use the -a flag, which copy directory recursively, keep all file attributes but never follow symbolic links.
# cp -a source_directoey target_directory