Find an Online Tutor Now

102 Answered Questions for the topic Linux

Linux

08/08/20

What is the relationship between man pages and info pages?

Linux Bash File

07/05/19

How to create a file in Linux from terminal window?

What's the easiest way to create a file in Linux terminal?

07/05/19

Exploring Docker container's file system?

I've noticed with docker that I need to understand what's happening inside a container or what files exist in there. One example is downloading images from the docker index - you don't have a clue... more
Linux Scripting Bash

07/05/19

How to count lines in a document?

I have lines like these, and I want to know how many lines I actually have... 09:16:39 AM all 2.00 0.00 4.00 0.00 0.00 0.00 0.00 0.00 94.00 09:16:40 AM all 5.00 0.00 0.00 4.00 0.00 0.00 0.00... more
Linux Pdf Merge

07/04/19

Merge / convert multiple PDF files into one PDF?

How could I merge / convert multiple PDF files into one large PDF file? I tried the following, but the content of the target file was not as expected: convert file1.pdf file2.pdf merged.pdf I... more
Linux File Editor

07/04/19

Convert DOS line endings to Linux line endings in vim?

If I open files I created in Windows, the lines all end with `^M`. How do I delete these characters all at once?
Linux Bash Printing

07/04/19

Print a file skipping first X lines in Bash?

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 any option to do this. I am looking for a command to do... more
Linux Grep

07/03/19

How can I use grep to show just filenames on Linux?

How can I use `grep` to show just file-names (no in-line matches) on Linux? I am usually using something like: find . -iname "*php" -exec grep -H myString {} \\; How can I just get the... more

06/30/19

What killed my process and why?

My application runs as a background process on Linux. It is currently started at the command line in a Terminal window. Recently a user was executing the application for a while and it died... more
Linux Bash Shell

06/30/19

./configure : /bin/sh^M : bad interpreter?

I've been trying to install lpng142 on my fed 12 system. Seems like a problem to me. I get this error [root@localhost lpng142]# ./configure bash: ./configure: /bin/sh^M: bad interpreter: No such... more

06/28/19

Chmod 777 to a folder and all contents?

I have a web directory `/www` and a folder in that directory called `store`. Within `store` are several files and folders. I want to give the folder `store` and all files and folders within the... more
Linux Memory Process

06/28/19

How to measure actual memory usage of an application or process?

**This question is covered [here][1] in great detail.** How do you measure the memory usage of an application or process in Linux? From the blog article of [Understanding memory usage on... more
Linux Bash Shell

06/27/19

How do I test if a variable is a number in Bash?

I just can't figure out how do I make sure an argument passed to my script is a number or not. All I want to do is something like this: test *isnumber* $1 && VAR=$1 || echo "need a... more

06/27/19

How do I delete an exported environment variable?

Before installing gnuplot, I set the environment variable `GNUPLOT_DRIVER_DIR = /home/gnuplot/build/src`. During the installation, something went wrong. I want to remove the `GNUPLOT_DRIVER_DIR`... more

06/27/19

Quickly create a large file on a Linux system?

How can I **quickly** create a large file on a Linux ([Red Hat Linux][1]) system? [dd][2] will do the job, but reading from `/dev/zero` and writing to the drive can take a long time when you need... more

06/25/19

How do I use sudo to redirect output to a location I don't have permission to write to?

I've been given sudo access on one of our development RedHat linux boxes, and I seem to find myself quite often needing to redirect output to a location I don't normally have write access to. The... more
Linux Bash Shell

06/24/19

Defining a variable with or without export?

What is `export` for? What is the difference between: export name=value and name=value

06/21/19

How to recursively find and list the latest modified files in a directory with subdirectories and times?

- Operating system: Linux - Filesystem type: ext3 - Preferred solution: bash (script/oneliner), ruby, python I have several directories with several subdirectories and files in them. I need to... more

06/21/19

How to keep environment variables when using sudo?

When I use any command with sudo the environment variables are not there. For example after setting HTTP_PROXY the command `wget` works fine without `sudo`. However if I type `sudo wget` it says it... more
Linux Shell

06/20/19

How can I recursively find all files in current and subfolders based on wildcard matching?

How can I recursively find all files in current and subfolders based on wildcard matching?
Linux Bash Datetime

06/20/19

Get current time in seconds since the Epoch on Linux, Bash?

I need something simple like `date`, but in seconds since 1970 instead of the current date, hours, minutes, and seconds. `date` doesn't seem to offer that option. Is there an easy way?
Linux Shell

06/20/19

Why doesn't "cd" work in a shell script?

I'm trying to write a small script to change the current directory to my project directory: #!/bin/bash cd /home/tree/projects/java I saved this file as proj, added execute permission with... more
Linux Stream Pipe

06/20/19

How can I redirect and append both stdout and stderr to a file with Bash?

To redirect *stdout* to a truncated file in Bash, I know to use: cmd > file.txt To redirect *stdout* in Bash, appending to a file, I know to use: cmd >> file.txt To redirect both... more
1 3 4 5

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.