Raza
  • Member for 9 years, 2 months
  • Last seen this week
cat files in current folder and all subfolders
Accepted answer
52 votes

try: find . -type f -exec cat {} +

View answer
Health check of web page using curl
28 votes

I think that for the simplest way to check if the site is alive, you could use the following method: curl -Is http://www.google.com | head -n 1 This will return HTTP/1.1 200 OK. If the return doesn'...

View answer
List ports a process PID is listening on (preferably using iproute2 tools)?
18 votes

You can use netstat for this to figure out pid of each listen process. netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships -a,...

View answer
Control + L not clearing screen
Accepted answer
14 votes

remap control : bind -x '"\C-l": clear'

View answer
How do I find the running GUI environment from the terminal?
13 votes

You can type env to figure out what environments are configured. The following response was found from this link XDG_CURRENT_DESKTOP - Tells you what Windows Manager you are using GDMSESSION - ...

View answer
High CPU utilization with zip command
7 votes

You can limit the cpu usage for zip command to not go beyond certain usage. for example, if you want zip command not to take more then 30% of CPU then you can use the following: cpulimit -e zip -l ...

View answer
Zombie process cannot be removed or killed
6 votes

It looks like the root cause of this zombie process is a bug that is described here. Getting Rid of Zombie Processes: You can’t kill zombie processes as you can kill normal processes with the ...

View answer
ssh to multiple hosts and run a command
6 votes

Yes, you can ssh hostname command and redirect the output to your report.txt The following script to get this report from all of your hosts. servername.dat contains all the host names. #!/bin/sh ...

View answer
Spoofing or removing DHCP client hostname in response to DHCP server
Accepted answer
5 votes

You can find host-name in dhcp client configuration to remove or add hostname. For example: Debian / Ubuntu Linux - /etc/dhcp3/dhclient.conf $ sudo vi /etc/dhcp3/dhclient.conf Set hostname as you ...

View answer
Using mintty as default terminal on Cygwin and default shell as bash
5 votes

You can launch mintty bash for bash to be default

View answer
What is the difference between these two SSHD configs?
4 votes

according to this reference, The match patterns may consist of single entries or comma-separated lists and may use the wildcard and negation operators described in the PATTERNS.. Therefore, it should ...

View answer
Linaro toolchain libstdc++.so.6 missing
Accepted answer
4 votes

You can try to install apt-get install lib32stdc++6

View answer
C Shell Array Declaration Syntax, () vs {}
Accepted answer
4 votes

{} are shell expansion, Brace expansion is a mechanism by which arbitrary strings may be generated. Patterns to be brace-expanded take the form of an optional PREAMBLE, followed by a series of comma-...

View answer
How to check if EDID can be tusted
Accepted answer
4 votes

try xrandr --verbose. It shows the raw edid detail as well.

View answer
Cygwin X doesn't work with DISPLAY localhost:0 on windows 10
3 votes

This is how you can void "-nolisten tcp" option and run xserver automatiaclly: <path-to-cygwin>\bin\run.exe -p /usr/X11R6/bin XWin -listen tcp -multiwindow -clipboard -silent-dup-error

View answer
Why when I ssh into one server it shows bash and the other have my username?
3 votes

Your home folder may not be identical on each system. You can check .bashrc or .bash_profile scripts are handle on each server. for the prompt you need to include export PS1="\u@\h \w> " in your ...

View answer
How to allow access to a directory and don't allow access to a sub-directory in Apache?‏
3 votes

You can create .htaccess with the following option, file in a directory that you do not want to show the listing. Order Deny,Allow Deny From All Allow From 192.168.1.2 steps: cd /...

View answer
Determining RHEL Type (Workstation vs Server)
Accepted answer
3 votes

You can tell by looking at /etc/redhat-release. Here is how they look like on each system: Workstation: /etc/redhat-release Red Hat Enterprise Linux Workstation release 6.2 Beta Client: /etc/...

View answer
Removing a specific line from a file
3 votes

You can use sed to search pattern to delete each line what contain this pattern sed -i '/Products below this line are out of stockNumber, month, year, reference, store/d' file

View answer
Where does Linux store logs of WiFi networks when searching? Does it at all?
Accepted answer
3 votes

You normally scan to get WiFi available network. You can iwlist scan or iw dev wlan0 scan and dump the output to any file. You need it to run this periodically then put it in to a cronjob.

View answer
Right settings of vsftpd?
Accepted answer
3 votes

Please make sure the following setting is configured in your /etc/vsftpd.conf file anon_root=/example/directory/ # Directory to be used for an anonymous login if you are trying to create a soft ...

View answer
What does `l` mean in an `ls` listing?
3 votes

The l represent symbolic link. if you are trying to remove the link then you can use rm .#filename.py to remove or if you are trying to remove the file the you need to use \since there is a : in your ...

View answer
Splitting a large binary file into sections determined by context patterns
Accepted answer
3 votes

The following will work: awk '/\^%%-=-=-=-=-=-=-=-=-=-=-=-=-=-%%\^/{n++}{print >"out" n ".ear" }

View answer
Can AutoFS keep a share permanently mounted on Solaris?
Accepted answer
3 votes

You can display or configure SMF autofs properties by using the sharectl command. For example # sharectl get autofs timeout=600 automount_verbose=false automountd_verbose=false ...

View answer
Node installation: No module named gyp.common
3 votes

what version of python do you have it installed. check python -V before you run ./configure, make sure you have the following prerequisites completed. * GCC 4.2 or newer * Python 2.6 or 2.7 * GNU ...

View answer
Permissions on an ext4 filesystem on a removable drive used in different machines
3 votes

Yes, on the other system if you have a user with same user ID then he/she will have access to it.

View answer
Expect script within bash & exit codes
3 votes

You need to initialize return value to a temporary variable. so like this: ./my_expect_script.expect a=$? if [ $a -eq 0 ]; then echo -e "\n" echo "Password successfully ...

View answer
Rename file in another directory without repeating path
3 votes

You can save the path foo=/tmp/foo/bar in your environment and use it as shortcut. mv $foo/blaz.txt $foo/foobar.txt or mv $foo/{blaz,foobar}.txt

View answer
Setting up an ad-hoc network on boot
3 votes

This blogspot entry has a guide for configuring a wireless network in ad-hoc mode. On the first machine, run these commands (fill in your own network information): ifconfig wlan0 down iwconfig ...

View answer
What should I include and exclude with rsync to back up my system?
2 votes

You can take full system backup using rsync. You can use --exlude=PATTERN for all directories that do not required . rsync -- a fast, versatile, remote (and local) file-copying tool -a, --archive ...

View answer