krissi
  • Member for 11 years, 4 months
  • Last seen more than a week ago
  • Hamburg, Germany
12 answers
113 votes
184k views
How to tell if a Linux system is big endian or little endian?
Accepted answer
133 votes

On a Big Endian-System (Solaris on SPARC) $ echo -n I | od -to2 | head -n1 | cut -f2 -d" " | cut -c6 0 On a little endian system (Linux on x86) $ echo -n I | od -to2 | head -n1 | cut -f2 -d" " | ...

View answer
2 answers
8 votes
6k views
Why does cron.weekly not run?
Accepted answer
20 votes

The cron.weekly scripts are started by run-parts which skips all files with extension. Rename runcheck.sh to runcheck and it should do

View answer
3 answers
4 votes
16k views
Scritp to wait for few seconds before executing next line
Accepted answer
12 votes

sleep <seconds>

View answer
2 answers
4 votes
4k views
Fastest way to move multiple databases to a new server
Accepted answer
8 votes

I do not know much about cPanel, but I know how to transfer a database very fast to another server - if you have access to ssh. use mysqldump with the proper parameters and chain it with ssh. so the ...

View answer
2 answers
1 votes
1k views
Generate automated cron jobs at different hours
Accepted answer
7 votes

You can use a static cronjob with a delay: 0 * * * * user sleep $(($RANDOM % 59))m; my_command (untested but should work)

View answer
2 answers
3 votes
5k views
Raid 5 with 4 disks on Debian automatically creates a spare drive
Accepted answer
5 votes

If you really want a Raid5 of your 4 drives (see comments above) you should be able to set the spare-device count to 0 with --spare-devices=0.

View answer
3 answers
0 votes
265 views
Linux disk space - partitions
Accepted answer
5 votes

You have to reduce the size of /home in 2 steps: reduce size of filesystem, reduce size of logical volume. This cannot be done online, so be sure to unmount /home before (i'm assuming you use some ext ...

View answer
1 answers
0 votes
472 views
USB drive only for Linux backups: To partition or not to partition?
Accepted answer
5 votes

Use a partition. One day, somebody needs a USB drive fast, take one from a box and think it is empty because there is not even a partition created and all your data is lost.. There will always be an ...

View answer
7 answers
14 votes
2k views
SSH equivalent of .profile/.bashrc
4 votes

You could put your configuration in .bashrc and only let them execute when you log in. To make this possible you could pass an environment variable through ssh. .bashrc modifications # common stuff ...

View answer
6 answers
88 votes
124k views
Can I send some text to the STDIN of an active process running in a screen session?
4 votes

Try this to start: # screen # cd /path/to/wd # mkfifo cmd # my_cmd <cmd C-A d And this to kill: # cd /path/to/wd # echo "stop" > cmd # rm cmd

View answer
1 answers
1 votes
154 views
Drive Warning: /dev/hda3 (/usr) is 87% full
Accepted answer
4 votes

du --max-depth=2 /usr | sort -n | less sorts the output and less allows to scroll up again

View answer
4 answers
1 votes
4k views
Monitor Services with $ in the service name in Icinga / Nagios
Accepted answer
3 votes

You have to escape the $ with another $ and single-quote the name: define service{ use generic-service host_name SERVERNAME ...

View answer
3 answers
0 votes
2k views
Using DNS in iproute2
Accepted answer
3 votes

There is a good chance that an A-Record resolves to multiple ip addresses: % dig +short google.com 209.85.148.101 209.85.148.102 209.85.148.113 209.85.148.138 209.85.148.139 209.85.148.100 So you ...

View answer
1 answers
1 votes
1k views
How to conserve memory and run more vms on vSphere 5.0 with vCenter 5.0?
Accepted answer
3 votes

1: Yes, you can over commit. See 2,3 for details 2: If the physical memory gets full, the ESX(i) starts its Memory Ballooning, Transparent Page Sharing and Memory Compression features. When the ...

View answer
2 answers
2 votes
204 views
Removing ssh key value pair
Accepted answer
3 votes

There is a file at /home/<user>/.ssh/authorized_keys. Every line contains a key which is allowed to log in. If you remove the old key from here and save the file, the old key is useless

View answer
1 answers
0 votes
162 views
linux: make links work after mount
3 votes

Your symlinks are pointing absolute to /home/dave/... On server side you have the directory structure. on client side the symlink points to exactly the same path. so there are 3 possible ways: The ...

View answer
4 answers
2 votes
1k views
rsync changing already existing files
2 votes

I think adding -t to your argument list will help. To verify this you could add --itemize-changes to the arguments (without -t). If I understood you correctly, this would show the T-flag in every ...

View answer
2 answers
0 votes
126 views
https redirect to https (No Cert Warning)
2 votes

The redirection source page will not load without warning from ssl unless you have a certificate for the domain. This is by design. To get rid of the additional ip address you could get a SAN ...

View answer
2 answers
2 votes
458 views
Bash: Variable substitution in variable name with default value
Accepted answer
2 votes

I think I figured it out: TARGET_VAR="$(eval "echo \${MYVAR_${USER_INPUT^^}-$MYVAR_DEFAULT}")" somecommand -foo "$(eval "echo \${MYVAR_${USER_INPUT^^}-$MYVAR_DEFAULT}")" It is bash compatible. ...

View answer
2 answers
0 votes
4k views
Set up router with 2 WANs and multiple subnets
Accepted answer
2 votes

You can do this with ip rule and friends (keyword: source based routing). First you need to build another routing table. Lets call it wan2. add it to /etc/iproute2/rt_tables Fortunately the output of ...

View answer
1 answers
1 votes
1k views
Apache proxy_mod refresh
Accepted answer
2 votes

append retry=0 to the ProxyPass directive. See http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass

View answer
1 answers
2 votes
2k views
Setting up Thin, Bundler and Ubuntu
Accepted answer
2 votes

You could create binstubs. using these the init-script should be like any other. thin just needs --damonize as parameter if you do not specify it in your thin.yaml. With thin install thin generates an ...

View answer
5 answers
1 votes
329 views
How can I modify path of a user with no home folder?
2 votes

you could change this in /etc/profile. There should be already a statement to set these paths for root.

View answer
3 answers
1 votes
2k views
Disable "Click Continue to get access to this folder"
Accepted answer
2 votes

I think not. The window just elevates the rights of the explorer. The same way you can run notepad with elevated rights and browse straight into the folders. Afaik you need to remove the permission ...

View answer
1 answers
0 votes
1k views
Ubuntu /etc/sudoers problem
2 votes

You need to log in as root, because you will not be able to use sudo until you fixed it. If you have set a root password, type su and go ahead. If not, you need some kind of rescue system or the ...

View answer
2 answers
0 votes
272 views
Windows Server 2003 - how to simulate mouse clicks using scripting
Accepted answer
2 votes

Maybe AutoIt can help you. It provides a scripting language and brings some functions to interact with other processes as a user would do

View answer
5 answers
4 votes
7k views
Can I tail an http resource?
1 votes

You might use the script from https://stackoverflow.com/a/1102346/401005 if you are able to run php scripts. You should add a flush(); after the echo. When using curl --no-buffer http://the/url you ...

View answer
2 answers
-1 votes
416 views
Practical use of hard link
1 votes

on some servers I use dirvish, which is a fully featured backup tool with rotating, etc. It uses hardlinks like you mentioned to create incremental backups. The nice thing about these Backups is, ...

View answer
2 answers
2 votes
211 views
Redirect STDERR separately for the shell and the program
Accepted answer
1 votes

Is it not possible to check if java is found and executable? test -x "$(which java)" && java -version 2>&1 or if you want to get around test and check for java-errors, too java -...

View answer
2 answers
1 votes
2k views
How can I launch RemoteApp on Windows Server from server itself at startup
Accepted answer
1 votes

If the server is not accessible physically by everybody, you could try to configure autologin on the console and just drop the .rdp file(s) (with saved credentials if needed) into the startup. After ...

View answer