Refresh alias defined in .bashrc
To refresh the aliases defined in .bashrc run:
$ source .bashrc
Or
$ exec bash
To refresh the aliases defined in .bashrc run:
$ source .bashrc
Or
$ exec bash
grep is a command-line utility that allows searching of words and/or patterns in a file or group of files. Its name comes from the ed command g/re/p (globally search a regular expression and print). Grep does a global search by keyword or regular expression and print all matching lines on the standard output.
Regularly I use ps ax | grep pattern to get information about a particular process, but in the oupout the grep process is shown, how to avoid this?
Simply encloses within square brackets the first letter or number of the pattern, for example:
Desktop like GNOME, KDE, XFCE, LXDE have a task manager that allows you to terminate a process using the graphical interface, but not always we have managers like these or we simply work without graphical interface (server) and we need to kill a particular process because it does not respond to any action, and that's when should lend hands to the console
To run a remote command on GNU/Linux or another UNIX variant, you must be able to access the remote server through ssh
$ ssh servidor-remoto command
In the GNU/Linux world, it is common to use lowercase characters to identify files and directories, to illustrate the above we show the DIRs that are found under the /etc/apache2 DIR on Debian GNU/Linux
/etc/apache2/ ├── conf-available ├── conf-enabled ├── mods-available ├── mods-enabled ├── sites-available └── sites-enabled
so if you have one or several DIRs in uppercase or lowercase and uppercase at the same time and for uniformity want to all be lowercase then you can rely on the following script.
[githubget repo=1]sysadmin/shscript/tolower.sh[/githubget]
To use the script download here
chmod a+x tolower.sh
./tolower.sh nombre-del-fichero
We can get CPU information in GNU/Linux by typing the following command:
$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 22 model name : Intel(R) Celeron(R) CPU 430 @ 1.80GHz stepping : 1 cpu MHz : 1800.045 ...
One of the easiest and safest ways to find duplicate files on GNU / Linux files is using the tool fdupes, fdupes find duplicate files comparing the file sizes, making a check MD5 followed by a byte to byte comparison.
fuseiso is an utility that allows you to mount ISO, BIN and NRG images in the userspace file system then you can browse them with any file manager such as any directory can be inspected.
Debian/Ubuntu and derivatives
$ sudo apt-get install fuseiso
CentOS/RHEL
Enable rpmforge
# yum install fuse-iso
$ fuseiso -p my.iso access-point
access-point = DIR where you will mount the image
– See 7-Zip – An excellent archive compressor / decompressor
– man fuseiso
7-zip is a file compressor with a high ratio of compression. The main features are: