whichcommand to locate
$ which Rscript /usr/bin/Rscriptalternatively define your interpreter as
#!/usr/bin/Rscript print("Hello R")Read more ...
#!/usr/bin/perl $decimal_number = 0b1000; print $decimal_number;Execution:
# ./convert.pl 8Read more ...
root@rhel7 ~]# ip route show default via 10.1.1.1 dev enp0s3 proto static metric 1024 10.0.0.0/8 dev enp0s3 proto kernel scope link src 10.1.1.110Read more ...
e2label. Both tools are part of
e2fsprogsand are used to solely on ext2/ext3/ext4 file systems.
e2labelis dedicated solely for partition or volume labeling. As it was already mentioned these tools will work only on ext2/ext3/ext4 file systems, that is you cannot label disk or partition or volume which does not have ext2 or ext3 or ext4 file system. does not
# e2label /dev/sda1 #Read more ...
$#. Consider a following example of simple bash script which will print out a total number of supplied command-line arguments to the STDOUT:
#!/bin/bash echo $#Save the above into a file called eg.
$ bash arguments.sh 1 2 3 4 4Read more ...
10.1.1.8 - - [10/Mar/2015:11:56:55 +1100] "GET / HTTP/1.1" 200 10543 "http://example.com/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36"From the above we can read that some user form
10.1.1.8using Chrome browser visited a root page of our web server, where the referer link is from
example.comdomain. Such a log entry can be generated by anyone with an access to proper tools. Let's use
curlcommand to generate false referral from mydomain.local:
$ curl -s -e mydomain.local http://mysite.local > /dev/nullRead more ...
file1with a following content:
$ cat file1 line 1 line 2 line 3Read more ...
~/.bash_historyonly after you properly exit your shell session.
shell 1: $ history -aRead more ...
.bash_history. This is a default history file defined by
# echo $HISTFILE /root/.bash_historyRead more ...
/var/sharesomewhere on the filesystem with a full access for all permission groups that is owner, group and any, thus all permission bits are set to "on"
# ls -ld /var/share/ drwxrwxrwx. 2 root root 4096 Mar 5 11:02 /var/share/From the above, we can see that any user have read, write and execute permissions to the
/var/sharedirectory. Next, in our scenario we have two users named
user2. Since everybody now have an access to
user1can navigate to this directory and simply create any arbitrary file:
user1@localhost ~]$ cd /var/share/ [user1@localhost share]$ touch file1 [user1@localhost share]$ ls -l file1 -rw-rw-r--. 1 user1 user1 0 Mar 5 11:08 file1 [user1@localhost share]$Read more ...