157 Answered Questions for the topic Linux

Linux Unix Cron Crontab

04/20/19

Restarting cron after changing crontab file?

Do I have to restart cron after changing the crontable file?
Linux Unix Grep Centos

04/20/19

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 ??

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
Linux Curl Proxy

04/12/19

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?
Linux Find Text Grep

04/12/19

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
Linux C Unix

04/11/19

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?
Linux Cpu Bash

04/09/19

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.
Linux Unix Syntax Bash

04/04/19

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?
Linux C++ C Api

04/04/19

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

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?
Linux Unix Ssh

03/27/19

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.
Linux Unix Bash Path

03/27/19

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 Unix Bash Shell

03/26/19

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.

03/26/19

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.
Linux C++ C Api

03/18/19

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
Linux Java Install Wget

03/18/19

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
Linux Unix Grep

03/15/19

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?

03/14/19

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?

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.