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

learn more… | top users | synonyms (1)

3
votes
1answer
81 views

bash runs out of memory

This question is a fork of this SO question. Here is the MCVE version: $ PS1='Parent-$ ' Parent-$ type seq seq is /usr/bin/seq Parent-$ bash $ PS1='Child-$ ' Child-$ for i in $(seq 1000000000); do ...
1
vote
1answer
67 views

Is there any command in linux which will force linux machine to not shut-down

I have a very important process which is having a Queue, In Queue i'm storing important data and when if someone trap that process it must have to process the data which is there in the Queue after ...
3
votes
1answer
65 views

What's the shortest way to find my WAN IP address at the command line? [duplicate]

What's the shortest command I could use to find out my WAN IP?
1
vote
1answer
36 views

How do I keep running a command in the same area of the console window? (“w”)

I'm looking at the output of w: ehryk@ArchHP ~> sudo w 14:12:37 up 4:08, 4 users, ...
2
votes
0answers
71 views

How to access KVM guest console without password?

How can I configure a KVM guest running CentOS to allow passwordless console access from the hypervisor? I want to be able to use the following command to log straight in to the VM from the hypervisor ...
1
vote
1answer
58 views

Can I check how much energy a USB device is consuming?

Is there any utility I could use to check how much energy a USB device is consuming, for a given time frame?
1
vote
1answer
51 views

Output Redirection

I am using the tee command to output the compilation errors of a program into a file along with the terminal. gcc hello.c | tee file.txt This is the command I have used. The compilation errors are ...
12
votes
2answers
842 views

Ctrl+D for ending terminal line input

If I do $cat > file.txt text<Ctrl+D><Ctrl+D> Question1: If I don't press enter, why do I have to press Ctrl+D twice? If I do $cat > file.txt pa bam pshhh<Ctrl+Z> [2]+ ...
1
vote
1answer
90 views

What does this `xhost …` command do?

Please help me understand this line of command: xhost +SI:localuser:lightdm in reference to the answer in this post and also suggest if there's a better way and why that's needed. I couldn't make ...
3
votes
3answers
99 views

extract from line to line and then save to separate file

I tried my luck with grep and sed but somehow I don't manage to get it right. I have a log file which is about 8 GB in size. I need to analyze a 15 minute time period of suspicious activity. I ...
4
votes
1answer
124 views

How to install / parse build dependencies from debian/control?

Let's suppose you downloaded a source code folder, that contains an existing /debian/ folder as well as /debian/control file. Let's suppose the package in question is not in Debian official ...
1
vote
1answer
60 views

Get file names in awk result

I have many files in a location where I need to list file names in which 32th column has value more than 3000. This is the command that gives me those records: awk -F, '$32 > 3000' * Now can ...
1
vote
1answer
152 views

How can I add applications to the lxpanel application launch bar via cli?

Is there a way on LXDE toolbar to change what applications are on the quick launch part via the terminal so that it can be put in a batch file to change on multiple clients?
1
vote
1answer
30 views

How do I merge (without copying) two directories? [duplicate]

I have: $ find 1 2 -printf '%i %p\n' 40011805 1 40011450 1/t 40011923 1/a 40014006 1/a/e 40011217 1/a/q 40011806 2 40011458 2/y 40011924 2/a 40013989 2/a/e 40013945 2/a/w I want: <inode> ...
-2
votes
2answers
68 views

Can I copy multiple directories into a single directory with a single command?

I have used photorec to recover data from a HDD and now have many directories /home/ray/recup_dir.1, to /home/ray/recup-dir.598 taking up valuable space in my Home directory. I want to copy them ...
1
vote
1answer
51 views

Can't boot Voyager Linux based on Xubuntu

I recently installed Voyager Linux, an linux distribution based on Xubuntu. The problem is that I cant boot it anymore. I have a dual boot system with Windows 8.1, but that's not the problem. I ...
0
votes
0answers
30 views

Pipe to `ls` Not Working as Expected [duplicate]

When I issue: [dave@dhost ~]$ which tar | ls -l I get the output of ls -l of the pwd. I expected to get: -rwxr-xr-x. 1 root root 395472 Feb 21 2013 /bin/tar Why doesn't the pipe work as I ...
1
vote
0answers
75 views

Unable to create a configuration directory for [FishShell] Please set the $XDG_CONFIG_HOME variable

I'm getting this error when starting fishshell: melanie:~ melanie$ fish fish: Unable to create a configuration directory for fish. Your personal settings will not be saved. Please set the ...
3
votes
2answers
120 views

closing parent process(terminal) doesn't close a specific child process

I'm new to Linux and so far,I have come to understand that if we open a new process through a gnome-terminal eg: gedit & "& for running it in background", then if we close the terminal, gedit ...
2
votes
4answers
78 views

How can I lock myself out of a linux box with iptables?

In the Securing Debian Howto I read (about iptables): The tools can easily be misused, causing enormous amounts of grief by completely crippling network access to a system. It is not terribly ...
2
votes
1answer
62 views

Concatenate and pass as parameter, bash

Need some help with removing default gateway. For example, there is an IP 192.168.4.15 with default gateway 192.168.4.14. I connect to WLAN with gw 10.0.0.1 and after that I would like do remove ...
1
vote
3answers
94 views

Running background process with screen command in xshell

screen command is a nice program for us to run process background, but I found Ctrl + a w do not show screen windows list in xshell(Xmanager component) and Ctrl + a k do not kill this screen terminal ...
1
vote
2answers
52 views

How to get a positive signal upon the successful completion of a command

For each of the following commands (four in total) I would like get an exception if one of them throws an exception if case of an error. Ultimately, I will run this through Python using os.system(). ...
2
votes
1answer
104 views

Changing the preferences of Gnome-terminal from within the terminal

Is there any way that we can edit the terminal preferences like background, colors, etc., from within the command line itself? The terminal is Gnome-terminal. I'm using Ubuntu 14.04 trusty tahr. I'm ...
6
votes
4answers
368 views

Command line shortcuts for changing directory

I'm looking for an easy way to navigate to directories spanning multiple hard drives and want to set something equivalent to a shortcut within the terminal. In Windows I would accomplish this with ...
2
votes
0answers
322 views

How to use terminal to access iCloud Drive when Finder is not running

I would like to access iCloud drive from Terminal in order to create an emergency backup. Unfortunately, my installation of Mac OS Yosemite is not operational, so I am using recovery mode to create my ...
-1
votes
1answer
80 views

Unzipping several specific files out of many into a directory using the terminal?

I recently installed Linux Mint 17 on my laptop. I had Windows 7 before, and I backed up all of my data onto an external hard drive. Windows 7 crams all of your backup data into a ton of .zip folders. ...
1
vote
3answers
75 views

Extract lines with specific dates and execute a command on each of them

I'm using a Google Drive command-line script that can return a list of files such as: Id Title Size Created 0Bxxxxxxxxxxxxxxxxxxxxxxxxxx ...
2
votes
1answer
62 views

.desktop file. Correct exec path

I use Fedora. There are a number of programmes packaged in a security spin. Included desktop files work but open the programmes with root priviliges. How can I edit the desktop file shown here to ...
1
vote
1answer
62 views

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

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, ...
1
vote
1answer
269 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
99 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
3answers
80 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 ...
4
votes
1answer
112 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
30 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
1answer
37 views

gconftool-2 doesn't refresh with the dbus anymore?

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 But it ...
1
vote
1answer
546 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
20 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
510 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
1answer
213 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
37 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
68 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
69 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
41 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
25 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
67 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
70 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
55 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
54 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
63 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 ...