The command-line is the interactive interface to your shell.

learn more… | top users | synonyms (1)

1
vote
1answer
17 views

how to `echo` 'formatted' man page of some command to text file

When I execute echo `man ls` > tem.txt I get unformatted output in the text file, I mean output without any new lines, just continues sentences. How do I get formatted output ? For example, ...
0
votes
0answers
5 views

How to permanently enable scl CentOS 6.4?

I installed a newer version of devtoolset (1.1) and was wondering how I would go about permanently setting these to be default. Right now, when I ssh into my server running CentOS, I have to run this ...
3
votes
0answers
32 views

Multiple wget calls in a single session?

I have the following code to retrieve a page from a website that needs authentication (it uses Sungard Higher Education authentication): wget --delete-after --save-cookies cookies.txt ...
0
votes
4answers
48 views

What is background and Foreground processes in Jobs

I'm studying Redhat Linux 7, topic Monitoring and managing Linux processes in it I understand Processess and its command. But I do not understand "Controlling Jobs" and Running jobs in the background ...
3
votes
0answers
16 views

Create torrent with files from different directories from CLI

I have a directory structure that looks like: dirA fileA1 fileA2 ... dirB fileB1 fileB2 ... I would like to create a torrent using CLI utilities that contains: dirA/fileA1 ...
0
votes
0answers
17 views

Is there a large performance difference between find and find2perl

Is there a performance difference between find and find2perl? I work for a hosting company and I was told that our admins prefer us to use find2perl over find. Supposedly this is because find is ...
0
votes
0answers
7 views

Are gconftool-2 and gconf-editor completely unrelated?

I used to use gconftool-2 to edit keys in this way (here I change the cursor shape in gnome-terminal): gconftool --type string --set /apps/gnome-terminal/profiles/Profile0/cursor_shape ibeam This ...
1
vote
1answer
52 views

Invalid back reference using grep

So I am trying to find 6-letter words that consist of one character repeated three times followed by another character repeated three times. For example aaabbb or oookkk. I am trying: grep -E ...
1
vote
1answer
15 views

How do I make an alias to substitute single word in a piped command? [duplicate]

I use aliases a lot but right now only for use cases like alias i='sudo apt-get install -y'. I often would like to add an alias in the following form: alias cmd='echo [something] >> ...
4
votes
1answer
112 views

Untar a specifc folder within tar.gz

How do I untar/uncompress a specific folder within a tar.gz using the terminal/commandline (Ubuntu 14.04 (Trusty Tahr))? Precise: -file.tar.gz -- folder1 -- folder2 How to extract... ... ...
0
votes
0answers
14 views

ipmitool set idrac mode

I have a DELL server R610, on this server there is a RHEL 6.4 This server has an idrac entreprise. I would like to configure the idrac from command line, avoiding reboot. I read on the man page of ...
0
votes
1answer
31 views

Remove a folder with the same name as an environment variable

I was messing around with a log4j properties file and accidently made a folder with the following text ${foo} however I also have an environment variable named foo that points to a folder so thus if I ...
4
votes
2answers
44 views

Unzip source arguments

To copy a bunch of zip files from one location to another: $ cp *.zip destination/ To unzip a bunch of zip files to a directory: $ unzip \*.zip -d destination/ man unzip says: The backslash ...
-3
votes
1answer
54 views

If statement to compare files

I need to make an if statement that: compares the files finds the differences between them gets a word count of both files pastes the information from one file to another But I do not know if I'm ...
1
vote
1answer
31 views

Is there a console command that replicates Alt+[F1..F10] to change terminal?

Hi I'm a Linux noob developing a custom embedded barebones distro. I have console access over serial to my machine. I would like to control what tty my user sees on their framebuffer. Currently the ...
1
vote
0answers
24 views

How the /etc/passwd file is accessed by passwd command [duplicate]

My question is we are the normal user. We can't access the file which we didn't have the permission. We are executing the passwd command then how that command is able to access that file. We are ...
1
vote
2answers
47 views

Extracting list of patterns which are output of another command

I can extract list of patterns using following command, fgrep -A 1 -f patternlist.txt filename.fasta but, is there a way I can extract without creating another file (patternlist.txt in this case) ...
0
votes
2answers
35 views

Creating background process and communicating with it

1st thing off, I am really a Linux newbie - knowing just some basics; there's a great chance I didn't know what I need to look for, please redirect me if you know a good source. What I'm trying to do ...
0
votes
1answer
40 views

Syntactic differences in cp -r and how to overcome them

Let's say we are in a blank directory. Then, the following commands: mkdir dir1 cp -r dir1 dir2 Yield two (blank) directories, dir1 and dir2, where dir2 has been created as a copy of dir1. ...
0
votes
0answers
24 views

Insert values from one database table to other database table through shell scripting in Ubuntu 13.10

I am working with 2 databases say logdb.db and logdb2.db . I have created a table named Original in logdb.db Sqlite database such as follows : CREATE TABLE Original (s_id INT PRIMARY KEY NOT NULL ...
0
votes
2answers
30 views

How can I expand all variables at the command line in Zsh?

In an earlier question, specific to bash, I asked How can I expand a relative path at the command line, with tab completion? I liked @Mikel's answer that mentioned using Ctrl+Alt+e to expand all ...
1
vote
5answers
72 views

How to move a file and change its name without retyping the name and just add the new characters

I change too frequently the location of some files generated daily. The thing is that I want to change their names by only adding the new required characters. What I want is something like this: $ ...
0
votes
1answer
59 views

Creating a list containing filenames with paths

I have a directory(INPUTDIR) with sample names as subdirectories(508_C,540_C,570_D etc).Within those each subdirectories there is another directory called FASTQ which contains two kinds of files. ...
1
vote
0answers
25 views

How to propagate TSTP while running a program as a different user

I'm running a terminal application via "su" in this fashion: su -c "/path/to/app --args" username This is done from a root context, and 'username' is a less privileged user in the system. The ...
0
votes
1answer
26 views

How to copy a whole directory structure with a certain file size limit? [duplicate]

For some reasons, I need to do a data clone. In which I need to copy the whole structure of a huge directory, but I'd like to only copy those files which are smaller than 1MB(with their hierarchy ...
-1
votes
0answers
19 views

how to pass command line arguments from c programm to the bash script? [migrated]

i have written one bash script and now am calling this script from c program. Now i want to pass arguments i.e. argv[1] and argv[2] to the script from command line.
1
vote
1answer
30 views

Print newlines on command output

If I get the result of a command on a variable, how can I print this output with new lines. Silly example: XX=$(ls -l); echo $XX When I execute the above sentence, I have one line ilegible result ...
0
votes
2answers
90 views

Remove a carriage return with sed

I have a large CSV file. One of the fields contains an error. This error appears as a new line in the file. Since now i've been using notepad++ with this command to correct the problem : \r";" ...
0
votes
0answers
30 views

Force lynx or elinks to interpret spaces and line breaks

Consider the following commands, and their results : $ echo "<br/> <br/>a<br/>b<br/>c<br/><br/> <br/>"|lynx -dump -stdin a b c $ echo "<br/> ...
1
vote
1answer
20 views

How do I specify command invocation for a mandatory short or long option?

I'm writing a specification for a tool that needs a -f / --foo option with a mandatory argument BAR, so for example these are valid calls: tool -f BAR tool --foo BAR How do I specify this syntax in ...
0
votes
1answer
34 views

Virtualbox vboxmanage clone does not show up in virtual machine list

I have a virtual machine that I am cloning with the command line interface to virtualbox like so: vboxmanage clonevm origVM --name origClone However, the clone is added to the directory ...
22
votes
3answers
1k views

How can I shutdown a RHEL server at 06:45 tomorrow morning?

I just received notification that our site has a power outage tomorrow morning. I am a Windows admin but I have to cover for our Linux admin who's not around until tomorrow evening. I need to ...
1
vote
1answer
50 views

Sort and count number of occurrence of lines

I have Apache logfile, access.log, how to count number of line occurrence in that file? for example the result of cut -f 7 -d ' ' | cut -d '?' -f 1 | tr '[:upper:]' '[:lower:]' is a.php b.php a.php ...
2
votes
3answers
65 views

Writing a script that outputs local users and their password expiration date

I'm new to Linux and scripting, and was doing a practice problem and am stuck on it. I'm supposed to write a script that outputs local users real name and their password expiration information. This ...
1
vote
1answer
40 views

How to change double hyphen to single hyphen of file names?

I have been using the rename command to get control over my naming conventions across my system. In converting spaces in file names to hyphens, I have inadvertently created consecutive hyphens in some ...
0
votes
1answer
79 views

What does newermt mean in find command?

I know I can use this option to find file between particular modified times. But I'm curious about what does this mean? I used man find | grep newermt trying to find something. But I got no direct ...
0
votes
1answer
35 views

Issues executing program

Ultimately I'm trying to get a program to run at start up and work correctly. I have been successful in getting it to show up in running processes after a reboot, but it doesn't seem like it is ...
2
votes
2answers
118 views

How to split an image vertically using the comand line?

So, say I have a large 800x5000 image, how would I split that into 5 separate images with dimensions 800x1000 using the command line?
3
votes
1answer
82 views

How do I resize partitions and filesystems on them?

How can I resize partitions from the command line? I've heard of GParted, but I don't want to use a GUI program.
4
votes
4answers
189 views

How to capture command line input into logfile and execute it at the same time?

Let's say I issue some commands on the command line: #capture what follows $ echo "foo" foo # don't capture $ echo "bing" bing # capture again $ echo "bar" bar How can I log commands selectively ...
0
votes
0answers
14 views

od: Put offset n to n of a hexdump to a file in proper hexdump -C (hex+ASCII) format

I have a 155GB canonical hex+ASCII hexdump hexdump -C blah > dump.dp Then ran: strings dump.dp | grep -bo 'XXXX' > found.txt So now, that file contains the string's hex offset in the ...
3
votes
2answers
62 views

How to print a range of IP addresses with Linux seq command

How can I print a range of ip addresses on linux command line using the "seq" command? For eg: I need seq to print a range of ip from 10.0.0.1 to 10.0.0.23 . Seems like the period in between the ...
24
votes
4answers
2k views

Is there a simple Bash tool which can quickly render basic HTML?

From time to time I need to do a simple task where I output basic HTML into the console. I'd like to have it minimally rendered, to make it easier to read at a glance. Is there a utility which can ...
3
votes
1answer
54 views

Run vsim from dmenu — it only works when directly invoked in the terminal

Works: vsim, sh -c vsim Doesn't work: echo "vsim" | sh, echo "vsim" | xargs -I {} sh -c "{}" I want to run ModelSim (vsim) with dmenu, which is triggered using xbindkeys. Details vsim is a ...
1
vote
1answer
44 views

Make parent directories while creating a new file

I am aware of the fact that mkdir -p /path/to/new/directory will create a new directory, along with parent directory (if needed ). If I have to create a new file, along with it's parent directories ...
5
votes
1answer
49 views

Printing webpage using browser via CLI

I want to automate printing. From URL in text file, the webpage is printed. I have tried using wget and the results are very inferior than when printed via browser. Somehow FF and Chromium both manage ...
0
votes
1answer
50 views

How to list down all useless or less used files or application in my linux server?

I want to clean cruft from my Oracle Linux server. For this, I need to know which application or directory isn't used or is hardly ever accessed. Is there any command or way to list directories or ...
-2
votes
2answers
47 views

How can I add lines in /etc/rc.conf

I followed this tutorial to install FreeBSD 10.1 and at the step where it says "Add the following lines to /etc/rc.conf" I must to add the following lines in there: hald_enable="YES" ...
1
vote
1answer
45 views

Ls -1 Command in linux on Ubuntu dosen't show details beside the name of each directory or file in the list? [closed]

I am using Ubuntu and when i issue this ls -1 command there is no details appear in-front of the directories and files names there is only a blank space ..what can cause this ?
0
votes
2answers
75 views

Unix grep confusion

I am doing an assignment for school and using putty to complete the assignment. The format of the assignment does not allow for much variation and thus only one answer is sufficient enough to allow me ...