$ if [ false ]; then echo "That was a true statement"; fi
Compare cert salaries and plan your next career move
smartctl -d auto /dev/sda
alias <nic driver> <eth3>
free -m total used free shared buffers cached Mem: 3832 3388 444 135 177 1557 -/+ buffers/cache: 1653 2179 Swap: 3971 0 3971
paul78 wrote: » hmm - I assume the kernel starts to reclaim non-dirty pages but if you are toast then the oom killer starts to kick in.
finhack wrote: » I have an interesting one! how to recover from chmod -x /bin/chmod ? (Real question, no joke)
setfacl -m u::rwx; setfacl -m g::rx; setfacl -m o::rx
finhack wrote: » how to recover from chmod -x /bin/chmod ?
#include <sys/stat.h> main() { chmod ("/bin/chmod", S_IRWXU|S_IRGRP|S_IXGRP); }
ChooseLife wrote: » Let's revive this thread, shall we? Question: How can you tell uptime of a system, without issuing "uptime" command?
Expect wrote: » top -n 1 | head -1
Expect wrote: » Question: how can you add timestamps to the history command output?
ChooseLife wrote: » How else? I am not looking for a command that readily prints the uptime (i.e. no "uptime", no "top, no "w", etc)
dolev@ubuntu:~$ stat /proc/uptime File: ‘/proc/uptime’ Size: 0 Blocks: 0 IO Block: 1024 regular empty file Device: 3h/3d Inode: 4026532042 Links: 1 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2015-03-10 06:02:04.864524011 +0200 Modify: 2015-03-10 06:02:04.864524011 +0200 Change: 2015-03-10 06:02:04.864524011 +0200 Birth: -
hiddenknight821 wrote: » GREAT QUESTION! I kept the honor code, and try not to refer to Google or the like, and I was able to figure out the answer after spending an hour on this. As always, the answer is in the man page of bash since history is bash built-in command. I had to change the HISTTIMEFORMAT variable. Yet, I didn't know how to manipulate it until the man referred me to the third section of strftime man page, which helped me arrive at the answer. I like the format below. It's more readable: %D' '%I:%M:%S' '%P' '%Z': '
Expect wrote: » files under /proc are created on boot so their creation date is the same as the uptime of the system e.g.:dolev@ubuntu:~$ stat /proc/uptime File: ‘/proc/uptime’ Size: 0 Blocks: 0 IO Block: 1024 regular empty file Device: 3h/3d Inode: 4026532042 Links: 1 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2015-03-10 06:02:04.864524011 +0200 Modify: 2015-03-10 06:02:04.864524011 +0200 Change: 2015-03-10 06:02:04.864524011 +0200 Birth: -
dolev@ubuntu:~$ stat /proc/uptime File: ‘/proc/uptime’ Size: 0 Blocks: 0 IO Block: 1024 regular empty file Device: 3h/3d Inode: 4026532042 Links: 1 Access: (0444/-r--r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2015-03-10 06:02:04.864524011 +0200 Modify: 2015-03-10 06:02:04.864524011 +0200 Change: 2015-03-10 06:02:04.864524011 +0200 Birth: -
ps eo lstart -p 1
ChooseLife wrote: » I will take it I was looking for something along the lines of ps eo lstart -p 1 but this is same
Compare salaries for top cybersecurity certifications. Free download for TechExams community.