linux

Switching to Linux for Windows development, bad idea?

I was contemplating switching to Linux for C++ development, coming from a Windows environment. Is this a bad idea? My workplace uses Windows and Visual Studio for our projects (some C# and java too, but right now I'm only developing in C++). If they decide to put me on a C# project, would development still possible (mono?)? What are the...

Can SVN handle case sensitivity issues?

Is there a way to force SVN to be case insensitive? We have an issue where a user commits from a linux environment with files say "file.ext" and "File.ext". Works just fine. The problem, however, is when a user on a MAC OSX or Windows attempts an update/checkout. The two files are considered the same and the action fails in error. ...

Mount executable as file on Linux/Unix filesystem

Is it possible to make an executable look like a read-only file on Linux, such that opening the "file" for reading actually executes the file and makes its stdout available for reading as if it were data in the "file"? It should be openable by any program that knows how to open a file for reading, for example 'cat'. ...

what is /dev/windrvr6

What is /dev/windrvr6 Is this a generic driver? I have 2 card made by different vendors using /dev/windrvr6 and they seem to work fine. Will this be a problem in the future? ...

How can I get the current network interface throughput statistics on Linux/UNIX?

Tools such as MRTG provide network throughput / bandwidth graphs for the current network utilisation on specific interfaces, such as eth0. How can I return that information at the command line on Linux/UNIX? Preferably this would be without installing anything other than what is available on the system as standard. ...

How can I print intermediate results from a pipeline to the screen?

Duplicate http://stackoverflow.com/questions/570984/how-can-i-gzip-standard-in-to-a-file-and-also-print-standard-in-to-standard-out I'm trying to count the lines from a command and I'd also like to see the lines as they go by. My initial thought was to use the tee command: complicated_command | tee - | wc -l But that simply doubles ...

looking for a working linux command line tool to download from rapidshare

I'm wondering if anyone knows about a working command line tool for linux to download using premium account on rapidshare. I've seen a python solution, which does not work for me -- returns urllib2 error message urlopen error unknown url type: https and my knowledge of python is not yet deep enough to figure out why: might be a recent...

How to open a command terminal in Linux?

Hi, I want to open the terminal (command prompt) on a Linux machine using Java code. I know how to open command prompt in windows.The following code i have used in windows String command= "cmd c/start cmd.exe" Runtime rt = Runtime.getRuntime(); Process pr = rt.exec(command); I need the same thing in Linux. Thanks for your answers. I ...

How do you determine what bash ls colours mean?

When you perform ls in a bash shell, sometimes there are colours to indicate different resource types, and you can enable/control this with the --color argument. But neither the man page nor Google is providing an answer to the question: What do these colours indicate by default, and how do I display what the current system uses? UP...

Cron does not run from /root

If I run a script from /home/<user>/<dir>/script.sh, as root, the cron works pretty well. But If I run the script from /root/<dir>/script.sh (as root, again), the cron does not seem to work. ...

Why for certain linux shell the datetime is Tue Feb 24 13:03:40 SGT 2009 why some is Tuesday, February 24, 2009 1:03:41 PM SGT

Why for certain linux shell the datetime is Tue Feb 24 13:03:40 SGT 2009 why some is Tuesday, February 24, 2009 1:03:41 PM SGT Is the SYSDATE SQL Statement really deriving the date/time from the server linux date command? Thanks ...

Calculate size of files in shell

I'm trying to calculate the total size in bytes of all files (in a directory tree) matching a filename pattern just using the shell. This is what I have so far: find -name *.undo -exec stat -c%s {} \; | awk '{total += $1} END {print total}' Is there an easier way to do this? I feel like there should be a simple du or find switch th...

How to clean caches used by the Linux kernel

I want to force the Linux kernel to allocate more memory to applications after the cache starts taking up too much memory (as can be seen by the output of 'free'). I've run sudo sync; sudo sysctrl -w vm.drop_caches=3; free (to free both disc dentry/inode cache and page cache) and I see that only about half of the used cache was freed...

Can libpcap reassemble TCP segments

I need to sniff TCP traffic into my application. Can libpcap reassemble TCP segments or I have to do it manually? The home page says "Full documentation is provided with the source packages in man page format". After I sudo apt-get install libpcap-dev I only find one man pcap. Is it all the documentation available or I simply missed so...

Getting inode from path in Linux Kernel

I'm currently trying to get an inode for a given pathname in a kernel function. All I have available is the full pathname. I've tried attempts like: user_path_at(AT_FDCWD, buffer, LOOKUP_FOLLOW, &path); But the dentry in that given path isn't valid, it seems to turn out. Then I thought perhaps trying stat() and getting the inode numbe...

How can I recursively copy a directory into another and replace only the files that have not changed?

Hi all, I am looking to do a specific copy in Fedora. I have two folders: 'webroot': holding ALL web files/images etc 'export': folder containing thousands of PHP, CSS, JS documents that are exported from my SVN repo. The export directory contains many of the same files/folders that the root does, however the root contains additio...

XCreateWindow gives a window ID that clashes with already existing window

I have created a program that creates a window using XCreateWindow. This works perfectly on my system and many others but on many, it is causing a few weird problems. e.g. the ID that I got from it clashes with the id of the terminal from which the program is launched. In one such case, gnome-terminal also has the window ID of 0x2400001 ...

Double spacing lines in a Linux terminal

Does anyone know if it's possible to force terminal to append a \n to every line it prints (or something similar)? I'm trying to debug some insane code which gives me errors the full width of my (24") screen and three lines long, so I'd appreciate not having to copy things into gedit and manually spacing them out every time I press make...

How do I set the class path on Linux?

I need an answer for the question in the title. Thanks. ...

Print a file skipping X lines in Bash

Hi I have a very long file which I want to print but skipping the first 1e6 lines for example. I look into the cat man page but I did not see nay option to do this. I am looking for a command to do this or a simple bash program. I know how to do it using a program in C but I want to do it using the common commands. Any way to do it? Tha...