List hidden files in Linux
Answer:
When your directory contains hidden files, e.g. filename start with a dot ., ls command by default will not to show them.
To list all files, include hidden files,
E.g.
# ls -a
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
List hidden files in Linux
Answer:
When your directory contains hidden files, e.g. filename start with a dot ., ls command by default will not to show them.
To list all files, include hidden files,
E.g.
# ls -a
Logout from the Linux system
Answer:
To logout from the Linux console, use the logout command.
# logout
Restart networking in Fedora/Red Hat Linux
Answer:
To restart networking functions in Fedora/CentOS/Red Hat Linux, execute the following command
# /etc/init.d/network restart
Search and replace string in file using Perl
Answer:
Besides using sed, Perl can also replace file in place with one-liner.
# perl -0777 -i -pe 's/abc/def/g' test.txt
Install Perl module using CPAN
Answer:
CPAN provide a very easy way to install Perl modules in Linux system
# cpan -i 'Digest::MD5'
The above command will install the module "Digest::MD5" into the system.