4
votes
3answers
67 views

What is the difference between [.]* and '.*' for command 'find -name'?

My goal is to find all files or directories in a filesystem that start with a dot (.), for example .gnupg. So I came up with the command: find -name '.*' Checking on the Internet, I saw some hints ...
0
votes
2answers
44 views

Cannot create root jail

I just tried to play around with chroot command only for testing purposes, in order to create a temporary root jail, but I didn't managed to. The platform is CentOS 6.4. and I have done it numerous ...
0
votes
0answers
22 views

linux cross compile [on hold]

im im cross compiling the simple c program through linux to arm the compilation is- export CROSS_COMPILE=~/gcc-linaro/usr/bin/arm-linux-gnueabi-${CROSS_COMPILE}gcc -o hello_world hello_world.c ...
0
votes
0answers
25 views

How to use grep command to find the matching pattern and some more characters? [duplicate]

I have a compressed JS code and I want to find a pattern, but since the file is compresses, it has only a line, and the match pattern is all the file. The output is too much large. grep -r ...
4
votes
1answer
59 views

returncode of command in a pipline [duplicate]

The following script runs on Solaris using /bin/ksh and on Linux using /bin/sh cmd | tee -a cmd.log | tail exit $? The output of cmd is saved in a file cmd.log and the last lines are displayed on ...
1
vote
1answer
64 views

Script to delete text files

I was trying to make a script that searches for all ASCII text files in the directory that you give and after that writes path of every file to a text file. After that it suppose to show head of each ...
5
votes
2answers
106 views

How to stop Fork Bomb out of memory error - RHEL 6

I set up test VM to test the effect of fork bombs. So I edited the limits.conf as follows for root user: root hard nproc 512 Now I drop a fork bomb like so: :(){ :|:& };: After ...
1
vote
2answers
51 views

How do I kill all screens?

I accidentally created over 1000 screens. How do I kill them all with one command? (Or a few)
2
votes
2answers
66 views

Bash doesn't read .bashrc unless manually started

bash won't source .bashrc from an interactive terminal unless I manually run bash from a terminal: $ bash or manually source it: $ source ./.bashrc or running: $ st -e bash Here's some useful ...
1
vote
1answer
32 views

Script that spawns terminal windows suddenly waiting for each window to close before opening the next one

I recently started using a bash script to setup terminal workspaces for myself, and everything worked fine for the first couple of days. I run the script, and four or five or seven terminals pop up, ...
0
votes
2answers
63 views

Shell, bash, linux : after variable declaration, why semi-colon and what does it do?

Here is the line. variable=`ls -A $1 | grep '[abc]'; ls -1 $1` I understand the line before the semi-colon but I do not understand how this line works after semi-colon. Does it after the ...
4
votes
1answer
213 views

Perl and Python wrongly interpreted via shebang on Linux

that problem just drives me crazy. All my Python and Perl scripts are simply NOT iterpreted via shebang. Never. But they work as expected when I explicitly call the binary. I double checked my ...
0
votes
1answer
36 views

Can anyone help me in leaning bash scripts? [closed]

I want to learn bash scripting on Linux. Can anyone provide good links for starting bash scripts?
2
votes
3answers
48 views

Is it a good idea to put environment variables to /usr/local/bin

I'm using aws cfn to start ubuntu instances, and I need to pass variables provided in cfn launch script to the scripts on the instance. For example, I may pass "db-server=db-2.domain.com" and there is ...
3
votes
1answer
35 views

Tmux: equivalent command to screen -d -m -S session_name

I'm looking at replacing screen with tmux, currently I use this screen command: screen -d -m -S session_name /root/script Is there an equivalent command for tmux that will do the same thing?

15 30 50 per page