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

learn more… | top users | synonyms (1)

0
votes
1answer
232 views

command to clean up old log files

I was trying to automate some auto cleaning of my Ubuntu System, with Cron Jobs I tryed to simplify this: sudo find /var/log -type f -name "*.1.gz" -delete sudo find /var/log -type f -name "*.2.gz" ...
0
votes
2answers
80 views

what are considered old and powerfull commands? [closed]

I came across the terms awk and sed, awk goes once through all lines and performs a task whenever a line meets a certain condition, sed can manipulate a stream of input before it goes further to the ...
2
votes
0answers
50 views

Show connected printers in CUPS

Is there a way to list the available/connected printers in CUPS using the command line or better yet using the CUPS API ? I already tried lpstat -a but it only lists the installed printers and not ...
0
votes
0answers
45 views

How do i log into a virtual terminal ?

I do not know what a virtual terminal is, but i have to enter one, in order to switch off the display manager in a fashion that allows me to type next a command in the virtual terminal that starts the ...
0
votes
1answer
43 views

what is the difference betwwen starting a command with nohup and &? [duplicate]

nohub and & seem to have a similar effect on the surface, they both start processes without occupying the shell from which they have been started, how do they differ on a deeper level?
0
votes
0answers
18 views

How can i enter the sudo X command after having killed the mdm display manager?

I was told, in order to just start the x window system, i have to input at the command line: sudo killall mdm. After having done so, my window freezes and i have no further controll, my only option so ...
2
votes
1answer
52 views

how to start into the x window server from linux mint ? [closed]

what do i have to do in the terminal in order to switch all the frontends of the xserver off, just to have the x window system running without any window manager or desktop environment?
0
votes
2answers
38 views

How to match multiple lines starting with a TAB, and the line before the 1st one in a group?

I've got some third party log files I'm trying to pull errors out of on the command line. The logs look like this: time=1 time=2 time=3 at com.test.com.... at com.test.com.... at ...
2
votes
1answer
115 views

Debian Linux: Start/run application/process in another virtual terminal

You'll have to bare with my my Linux terminology is pretty bad. When I say virtual terminal I'm talking about when you press ctrl+alt+ a function key (F1-F12). I think they are called virtual ...
2
votes
3answers
107 views

How to insert bash variables in awk?

How to insert bash variables in awk (for example i need to do in in some for loop - like this: in first iteration use awk to search string by first column, next by second column and so on with using ...
0
votes
0answers
52 views

Is there a way to find the uptime of a network card in unix?

Some of the information i am requesting can be gleaned from /var/log/syslog , e.g: grep wlan /var/log/syslog But the usefulness of that information also depends on how you are network connecting; ...
1
vote
2answers
264 views

Perform multiple commands on one line

There are two steps, that I would like to be run on one line: twinkle -c then call sip:in06khattab@sip.linphone.org Here is the output: I wanted to perform these two steps on one line, I ...
2
votes
1answer
81 views

Unix sort by multiple columns

I have trouble understanding unix sort. Consider the following file (tab separated) aa ~ a1 aa B b A b ~ e bb B bb ~ B When calling: cat tmp2 | sort -t $'\t' -k1,2 I get aa ~ a1 aa B ...
0
votes
1answer
25 views

Coordinates X237595Y81600 to X2375Y8160

I have create a gerber file and it has lines inside which look like this: X90095Y15350 X100095Y15350 X110095Y15350 X120095Y15350 X120095Y25350 X110095Y25350 X100095Y25350 X90095Y25350 X80095Y25350 ...
0
votes
0answers
31 views

Downgrading nvidia drivers in Sles 11

I'm trying to find out how to downgrade my graphic driver? Current Driver nVidida driver : 319.76, Needed Driver: 319.32 Can anyone help me with some steps on how to do this?
0
votes
0answers
47 views

TTL Editor Tera Term Macros

I am running TTL editor to send command via ethernt to a control unit to get status data, The problem I have is that part of the test is to shut off for about 20 minutes, I need a command to still ...
2
votes
2answers
64 views

How do I allow privileged commands to fail but respond?

I am reading up on several commands, some of which are privileged and some that may or may not be installed. My system (gentoo) will respond with command not found sometimes when the program in the ...
0
votes
1answer
30 views

Can I treat all what I typed after a command as raw string?

I made a bash func for myself so I can through some words into a tree_hole file, it looks like this in bashrc: function th { echo -e "\n$@" >> /Users/zen1/zen/pythonstudy/tree_hole; } export -f ...
0
votes
2answers
63 views

How can I open a man page in a new terminal window?

I'm wondering if anyone can help me with a workflow issue. I sometimes open up a man page for a command, take note of several command options and parameters, go back to the command line and then input ...
1
vote
2answers
60 views

Use awk to replace a column without changing format [closed]

I have a PDB file (see below) and I need to change the A in column 5 to a B, AND I need to change it without changing the format of the original file. I was able to change the A to a B using this awk ...
5
votes
4answers
345 views

How to move all files inside present subfolders up here

I have 50 folders with some subfolders too, with more than 1000 audio files total. I need to remove all subfolders and put all files in present level. Tried mv */* ./ but it complaints: argument list ...
0
votes
2answers
85 views

how to delete files from a specific date and extension

Short and sweet: One of my hosting subscriptions got hacked. I ran this command: find path-to-folder/ -mtime -7 -name "*.php" –print this produced about 11 pages worth of malicious code which was ...
0
votes
2answers
155 views

Remove all files recursively without deleting directories

I want to "clean out" all of the files a directory including all files in subdirectories but I want to leave the subdirectories in place. My understanding of rm -r is that it will also delete the ...
1
vote
1answer
122 views

Zip the contents of a folder without including the folder itself

I have a directory called folder that looks like this: folder -> root_folder -> some files I want to zip this directory into zipped_dir, I tried: zip -r ...
1
vote
1answer
77 views

ss is replacing netstat, how can I get it to list ports similarly to what I am used to?

I've been trying to modernise my way with Linux by, for one thing, ditching netstat for ss. I looked up my favourite command line flag for netstat in the ss man pages, and was very glad to find that ...
1
vote
2answers
57 views

List the files of another format while finding a certain name pattern

I had wanted to edit the txt files of videoA and videoB only if the movs files names contains the namespace -test For eg. videoDir |-videoA |- videoA_v001_test.mov |- ...
0
votes
1answer
57 views

How to install oddjob-mkhomedir repository on AMI box using command line

I'm trying to install oddjob-mkhomedir and it comes back with no package available nothing to do. I used sudo yum install oddjob-mkhomedir so I'm assuming the repository is not available. My ...
1
vote
1answer
59 views

split line based on space and delete the second part

I have a big file >fid|29290408|locus|VBIEntCas2262_0001| Phosphoglycolate phosphatase (EC 3.1.3.18) [Enterococcus casseliflavus EC20] ...
1
vote
1answer
49 views

Broken git autocompletion after I have overridden the git command

Recently git branch <tab> started showing me the following error: $ git branch bash: -c: line 0: syntax error near unexpected token `(' bash: -c: line 0: `/usr/bin/git --git-dir=.git ...
1
vote
3answers
58 views

Display distinct values of a list and number of occurences

I have a program that writes on the standard output a list of string values, one per line, and I would like to display in real time the list of distinct values along with the number of occurences for ...
1
vote
1answer
61 views

How to zip only files under multiple subdirectories?

I have a folder working and its structure is something like this - working/ 100/ 1/ 2/ 3/ 200/ 1/ 2/ 3/ 300/ 1/ 2/ 3/ And each of these 1 ...
0
votes
1answer
26 views

Insert space at specified position in a file

I have this sample file: 234234|111||J1X0H8|SERP||R|D|666|M 234235|222||J1X0N5|SERP||C||555|M For each line, I need to insert a space after the 3rd character of the 4th column, like so: ...
1
vote
3answers
74 views

Removing mulitple lines

I am trying to write up a command line interfaces that will removes a particular section / lines of codes within a list of json files. By the way, the json file are located within the sub-folders of ...
1
vote
1answer
67 views

Save and restore terminal tabs with custom tabs title

I have a Terminal window with a dozen named tabs open *(gnome-terminal) I would like to save the current configuration and have it restored with names and directories. Is there a way to do this? I've ...
1
vote
1answer
70 views

How to run a command in background always?

the below command when I run from the terminal will keep posting the output to message.log cf logs broker-analytics > /var/www/cfbrokerlogs/message.log However, if i close my terminal it will ...
2
votes
2answers
130 views

Using the output of `grep` as variable in second command

I currently have 2 bash command line strings I use to gather data needed for a certain task. I was trying to simplify and have only one command used to gather the data without using a script. First I ...
1
vote
2answers
68 views

ls .. doesn't work properly with symlinks

I have directories set up a bit like this ~/code ~/code/src ~/code/build -> /path/to/somewhere/else That last one's a symlink. If I do this cd ~/code/build ls .. then I get the listing for ...
1
vote
3answers
298 views

How to copy files from the folder without the folder itself

I'm trying to copy files and subfolders from A folder without the A itself. For instance, A folder contains next: | file1.txt | file2.txt | subfolder1 Executing next command gives me ...
8
votes
2answers
458 views

Run another command before running the command the user wants to run

Let's say I want to modify the original behavior of the ls tool this way: $ ls Hello World file1 file2 ... How can I do this? When running ls I would like to run another command let's say echo ...
1
vote
2answers
215 views

Why does “grep '.*[s]' file” work and “grep .*[s] file” doesn't?

Comparing grep '.*[s]' file with grep .*[s] file Why do you need quotation marks to let this work properly? In the second case, grep seems trying to inspect every file with a period.
0
votes
3answers
95 views

Unable to use make to install Valgrind

I am attempting to download and install Valgrind using the following instructions: I get through step 3 just fine, but when I type make I get the message make: *** No targets specified and ...
1
vote
1answer
43 views

obexftp return code 97

I have been trying to send a file with bluetooth from my raspberry to my phone. I tried to use obexftp to do this but it gave me the return code 97. I have not been able to find out what this code ...
0
votes
1answer
31 views

Sourcing a redistributable script by default

I am creating a bash script which I wish to release on github. The script needs to access the command history but this is not possible without sourcing that script. I don't want users to put it in ...
3
votes
2answers
149 views

BASH: Special character '�' suddenly appeared (Ubuntu)

When I erroneously type 'ñ' (expecting to type any command) and then remove it and type the correct letter, the output returns the command with a special character attached �, obviously the shell ...
2
votes
3answers
51 views

Cannot remember the name of a CLI recorder software

I stumbled across a useful command line recorder that allows the user to copy the text when watching the 'recording'. I just cannot remember the name of the project. I just remember you can play and ...
3
votes
2answers
117 views

Tell gzip/bzip2/7z/etc not to compress already-compressed files?

I'm tarring up /home, and piping it through bzip2. However, I've got lots of already-compressed files out there (.jpg, .mp4, .mkv, .webm, etc) which bzip2 shouldn't try to compress. Are there any ...
1
vote
1answer
119 views

Service network restart same as ifup and ifdown?

Can service network restart take place of ifdown and ifup? I was managing my server the other day using SSH and I changed my internal IP from DHCP to static. After editing the config file I had to ...
0
votes
2answers
73 views

Tilde on unix:hpux and / or solaris

On Linux press F9 return a correct ~ On unix(solaris or hpux) return 0~ How to set correct tilde on those systems?
5
votes
2answers
230 views

ls -l /proc/self | increamental PID?

Each time, when the commandls -l /proc/self is executed, the link points to process who's PID keeps increasing. Why is this so ? Is it the PID of the ls command ?
-2
votes
2answers
43 views

What is a simple example where the use of the command line is unavoidable or better? [closed]

I want to see a simple example that motivates the use of the Linux command line. Like I want to see an example where the use of the command line will do it in seconds and on GUI , it will take you ...