155 Answered Questions for the topic Linux
How to grep a string in a directory and all its subdirectories' files in LINUX?
How to grep a string or a text in a directory and all its subdirectories'files in LINUX ??
04/18/19
Where can I set environment variables that crontab will use?
I have a crontab running every hour. The user running it has environment variabless in the `.bash_profile` that work when the user runs the job from the terminal, however, obviously these don't get...
more
Linux Java
04/14/19
Error: Could not find or load main class?
I am having trouble compiling and running my Java code, intended to allow me to interface Java with a shared object for Vensim, a simulation modeling package.
The following code compiles without...
more
performing HTTP requests with cURL (using PROXY)?
I have this proxy address: `125.119.175.48:8909`
How can I perform a HTTP request using cURL like `curl http://www.example.com`, but specifying the proxy address of my network?
How do I find all files containing specific text on Linux?
I'm trying to find a way to scan my entire Linux system for all files containing a specific string of text. Just to clarify, I'm looking for text within the file, not in the file name.
When I was...
more
Why does ENOENT mean "No such file or directory"?
What is "ENT" short for?
The `error` :
>No such file or directory
should just be named by "ENOFILE".
Is there any story or reason?
How to obtain the number of CPUs/cores in Linux from the command line?
I have this script, but I do not know how to get the last element in the printout:
cat /proc/cpuinfo | awk '/^processor/{print $3}'
The last element should be the number of CPUs, minus 1.
How do I syntax check a Bash script without running it?
Is it possible to check a bash script syntax without executing it?
Using Perl, I can run `perl -c 'script name'`. Is there any equivalent command for bash scripts?
What is Linux’s native GUI API?
I hope this doesn’t come across as a stupid question but it’s always something I have wondered. Both Windows (Win32 API) and OS X (Cocoa) have their own APIs to handle windows, events and other OS...
more
04/04/19
How to kill a process running on particular port in Linux?
I tried to close the tomcat using `./shutdown.sh` from tomcat `/bin` directory. But found that the server was not closed properly. And thus I was unable to restartMy tomcat is running on port...
more
04/02/19
Why does the C preprocessor interpret the word "linux" as the constant "1"?
Why does the C preprocessor in GCC interpret the word `linux` (small letters) as the constant `1`?
test.c:
#include
int main(void)
{
int linux = 5;
return 0;
}
Result of `$ gcc -E...
more
04/02/19
Will Photoshop run on Linux?
I have installed Photoshop on Linux using wine. It's crashing again and again.
Is there any way to use Photoshop on linux?
How to download a file from server using SSH?
I need to download a file from server to my desktop. (UBUNTU 10.04) I don't have a web access to the server, just ssh.
If it helps, my OS is Mac OS X and iTerm 2 as a terminal.
How to permanently set $PATH on Linux/Unix?
I'm trying to add a directory to my path so it will always be in my Linux path. I've tried:
export PATH=$PATH:/path/to/dir
This works, however each time I exit the terminal and start a new...
more
Linux: copy and create destination dir if it does not exist?
I want a command (or probably an option to cp) that creates the destination directory if it does not exist.
Example:
cp -? file /path/to/copy/file/to/is/very/deep/there
03/26/19
How to convert Word (doc) to PDF in linux?
I have a set of files in **.doc** format, that need to be converted to **.pdf** format. I am using Ubuntu linux.
How do I get cURL to not show the progress bar?
I'm trying to use cURL in a script and get it to ***not*** show the progress bar.
I've tried the `-s`, `-silent`, `-S`, and `-quiet` options, but none of them work.
Here's a typical command I've...
more
03/18/19
Lost httpd.conf file located apache?
How can I find where my `httpd.conf` file is located?
I am running an Ubuntu Linux server from the Amazon Web Services EC2 (Elastic Compute Cloud) and I can't find my Apache config.
What is Linux’s native GUI API?
I hope this doesn’t come across as a stupid question but it’s always something I have wondered. Both Windows (Win32 API) and OS X (Cocoa) have their own APIs to handle windows, events and other OS...
more
Downloading Java JDK on Linux via wget is shown license page instead?
When I try to download Java from Oracle I instead end up downloading a page telling me that I need agree to the OTN license terms.
> # Sorry!
>
> In order to download products from...
more
How do I grep recursively?
How do I recursively `grep` all directories and subdirectories?
find . | xargs grep "texthere" *
03/14/19
How to find out what group a given user has?
In Unix/Linux, how do you find out what group a given user is in via command line?
How to join multiple lines of file names into one with custom delimiter?
I would like to join the result of `ls -1` into one line and delimit it with whatever i want.
Are there any standard Linux commands I can use to achieve this?
Linux Unix
03/14/19
Using ls to list directories and their total sizes?
Is it possible to use `ls` in Unix to list the total size of a sub-directory and all its contents as opposed to the usual 4K that (I assume) is just the directory file itself? I.E.
total 12K
...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.