Archive for category Other
Linux command list for System Info
- pwd
Prints the current working directory (Print Working Directory)
- hostname
Print the name of the local host (the machine on which you are working). If you want to change the name of the machine, Use netconf (as root).
- id username
Print user id (uid) and his/her group id (gid), effective id (if different than the real id) and the supplementary groups.
- whoami
Prints your login name. - date
Print or change the operating system date and time. If you want to change the date and time to 2010-12-31 23:57 using this command:
date 123123572010
To set the hardware (BIOS) clock from the system (Linux) clock, use the command (as root) setclock - who
Determine the users logged on the machine. - rwho -a
(remote who) Determine all users logged on your network. The rwho service must be enabled for this command to run. If it isn’t, install “rwho”. - time
Determine the amount of time that it takes for a process to complete + other info. Don’t confuse it with thedate command. E.g. I can find out how long it takes to display a directory content using:
time ls - finger username
System info about a user. Try: finger root - last
Show listing of users last logged-in on your system. - history | more
Show the last (1000 or so) commands executed from the command line on the current account. The “| more” causes the display to stop after each screenful. - uptime
Show the amount of time since the last reboot. - ps
(Process Status) List the processes currently run by the current user. - ps axu | more
List all the processes currently running, even those without the controlling terminal, together with the name of the user that owns each process. - top
Keep listing the currently running processes, sorted by cpu usage (top users first). In KDE, you can get GUI-based Ktop from “K”menu under “System”-”Task Manager” (or by executing “ktop” in an X-terminal). - uname -a
(Unix Name with option “all”) Info on your (local) server. I can also use guname (in X-window terminal) to display the info more nicely. - free
Memory info (in kilobytes). - df -h
(Disk Free) Print disk info about all the filesystems (in human-readable form) - du / -bh | more
(Disk Usage) Print detailed disk usage for each subdirectory starting at the “/” (root) directory (in human legible form). - cat /proc/cpuinfo
Cpu info–it show the content of the file cpuinfo. Note that the files in the /proc directory are not real files–they are hooks to look at information available to the kernel. - cat /proc/interrupts
List the interrupts in use. - cat /proc/version
Linux version and other info - cat /proc/filesystems
Show the types of filesystems currently in use. - cat /etc/printcap
Show the setup of printers. - lsmod
(As root. Use /sbin/lsmod to execute this command when you are a non-root user.) Show the kernel modules currently loaded. - set|more
Show the current user environment. - echo $PATH
Show the content of the environment variable “PATH”. This command can be used to show other environment variables as well. Use “set” to see the full environment. - dmesg | less
Print kernel messages (the content of the so-called kernel ring buffer). Press “q” to quit “less”. Use less /var/log/dmesg to see what “dmesg” dumped into this file right after the last system bootup.
How to install git on Red Hat Linux / Cent OS
Git is dependent on the follow libraries, make sure they are installed.
yum install zlib-devel yum install openssl-devel yum install perl yum install cpio yum install expat-devel yum install gettext-devel
Curl will need to be installed from source. The current version from Red Hat/Cent OS doesn’t work correctly with Git.
wget http://curl.haxx.se/download/curl-7.18.0.tar.gz tar xzvf curl-7.18.0.tar.gz cd curl-7.18.0 ./configure make make install
Next, make sure /usr/local/lib is in your ld.so.conf, this is required for git-http-push to correctly link up to the Curl version you are installing.
vi /etc/ld.so.conf (Insert the following) /usr/local/lib Save the file, then run: ldconfig
Now download and install Git
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz tar xzvf git-latest.tar.gz cd git-date autoconf ./configure --with-curl=/usr/local make make install
What’s the difference between 301 redirects and 302 redirects [Quick Answer]
Quick answer: 301 – permanent redirect and 302 – temporary redirect.
FOSFacebookBundle: “The Facebook user could not be retrieved from the session.” (a possible solution)
If you get the message below when you try to connect to your site via Facebook Connect,
The Facebook user could not be retrieved from the session.
You just need to change your localhost URL on your own hosts file that Facebook can give you cookie permission of which is blocked by default for localhost development.
To do that, just add a new line below to your hosts file;
127.0.0.1 localhost.local
And do not forget to change your application settings at developer.facebook.com to allow your new application URL http://localhost.local/your_app/.
Thank you for reading.
Overall Summary of my First Week on the New Job at Enuygun.Com
The end of the week showed up for me and I feel like writing about my firs week at Enuygun.Com. Firstly, I haven’t learn much about the company but I think its a kind of new but successful company. I’m a senior software developer here and we’re going to build applications, services, mobile applications and an affiliate system for all we can share the growth. We are using Symfony2 as PHP framework of which I had no idea at the beginning. For the first 2 days it was like what a horrible structure that everything is bundled and you need to create new bundle to use the other bundle. At least, that’s what I think it was. After a huge concentration on research and watching some tutorials about Symfony, I now can say that, it might be the best framework to be used to develop easily implemented bundles that could be used by many applications. It’s not that none of the other frameworks don’t have the ability but it is for me now that when I think about bundled or plug in based system development is Symfony.
All in all, although I did not have any clue about the technology that they have been using till now, I think I made a grate performance to figure out what is what, why it is used and how I can use things while I have my developer hat put-on. So, the thing is, Enuygun.com is totally new for me and I feel like I’m going to be successful as I used to be on the previous companies. But I should note that, getting a job far away from your home is not the best choice. But it was a quick shoot. I hope I made a good decision.
Thank you for reading.