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

learn more… | top users | synonyms (1)

5
votes
2answers
256 views

What's the difference between `-C` and `-c` in `tr` command?

Today I learnt a bit about tr command. But I was stuck at understanding the difference between -c and -C. On the manual, it said: -C Complement the set of characters in string1, that is ``-C ...
1
vote
2answers
89 views

Why is a2p (Awk to Perl translator) installed by default? Why would I want to convert Awk to Perl? [closed]

I am surprised to see the a2p utility installed by default in my Linux distribution. a2p is a command line utility that converts an Awk program from standard input to a perl program that it outputs ...
1
vote
1answer
40 views

Running interactive java code with qsub

I'm trying to run my Java code remotely using SSH. I need to do this with qsub, so I've created a short bash script that compiles my Java files and then runs the main one. Here's the thing: My code ...
1
vote
0answers
35 views

Is there any way to repair fedora 20 with no internet connection and no installation cd? [closed]

When Fedora goes haywire and refuses to boot 100% properly, but you can access the single user CLI-only mode, is there a way to reinstall/repair what is already on the system when there's no network ...
0
votes
0answers
11 views

What does 'package-cleanup --problems' command actually do (Fedora 20)?

I tried using this command when I was experiencing some difficulties, and I thought by the man description that it would remove or repair the files, but it seems to simply list them? Is that the ...
1
vote
2answers
36 views

pipe as arguments

I'm trying to use the output of a command as arguments: The command: /home/alexandre/dropbox.py exclude add ls | grep -v photos I have to add a list of files, for example: ...
2
votes
1answer
51 views

sed regex for capture group between delimeters

I have a two line file that I'm trying to get some info out of for a bash script using sed. # File Comment PrefixForInformation {information to be captured} I need to get the information between ...
1
vote
2answers
22 views

how to move by a word in command line in tcsh?

let's say the command is "ls word1 word2 word3" I want to move the cursor from end of line to "word2" but do not want to clear "word3" in process. Just jump back by two words and reach beginning of ...
2
votes
1answer
47 views

GNU Screen: How to enable or disable logging while screen is already attached?

Suppose I have whole bunch of processes running under screen, but I forgot to execute screen -L initially. Is it possible to enable and disable the logging of a currently attached screen without ...
-1
votes
1answer
73 views

How to take a directory or file backup using command?

I have uploaded my file there will be a daily changes in that file for safer side i want to take backup that directory,when i tried copy that folder to another it is showing whenever i have created ...
1
vote
1answer
40 views

Showing prompt from ssh command

I am running this command: ssh -i key user@domainname 'bash -l -c "command"' The command script calls on another script that asks for input at some point. The problem is that the prompt for the ...
1
vote
1answer
105 views

md5sum for every file (with ll)

I want output like this: name size and hash: myfile.txt 222M 24f4ce42e0bc39ddf7b7e879a mynewfile.txt 353M a274613df45a94c3c67fe646 For name and size only I have ll -h | awk '{print ...
0
votes
1answer
89 views

Grep -v filter not working

I want to filter grep results by using grep -v option. But the output does not differ when using a particular pattern. contents of log.log: ERROR error EXCEPTION exception ...
1
vote
0answers
24 views

exchange a column of many many csv files using awk [duplicate]

There is a similar post, but this one is slightly different. I have a csv file in which the second column contains some alphanumeric data. I need to delete this entire column and replace it with a new ...
1
vote
5answers
43 views

can't remove file with carriage returns

I have a file blahblah\r\n.txt that I want to remove but rm blahblah\r\n.txt does not work as I receive No such file or directory message. How to remove??
-1
votes
1answer
48 views

How do I backup /var/log to my home directory? [closed]

I need to create a script to backs up the entire content of /var/log into my home directory. The output folder name should be auto-generated in ~/backups/logYYYYMMDD format.
0
votes
1answer
19 views

Lock multiple files in a shell script

I have a C program that can lock 1 file. I need to lock multiple files so the solution here would be to have multiple instances of this program running but this also means having multiple terminals ...
-4
votes
2answers
97 views

Extracting usernames from the /etc/passwd file

What command(s) would you use to extract all of the usernames from a database called /etc/passwd and then sort this output alphabetically in reverse order?
2
votes
0answers
58 views

I can't delete a file from EFI System Partition

I'm trying to delete a file since I installed rEFInd instead or Grub, I want to remove Grub or just remove "grubx64.efi" from my ESP, to make it disappear in the rEFInd boot screen. I can mount my ...
1
vote
1answer
44 views

Is there any command that read their standard input in special cases? [closed]

I have been looking for lesser known commands that reads their standar input in special cases(missing arguments , for example). I'm thinking "cat" or maybe other command would fit here .. but I'm ...
1
vote
1answer
96 views

ls -l without file permissions

How can I use ls while using -l (long listing) without showing the file permissions? Right now I have the following alias for ls: alias ls='ls -lhaG --color=auto' I have found a solution close to ...
2
votes
2answers
40 views

How could I create sort of a “CLI Kiosk mode” at system startup?

I created a script that, when executed, leaves the user with a blank screen where he can only type, much like a typewriter. It's a Python script, and I intend to port it to pure Bash eventually. Now ...
0
votes
2answers
212 views

Chat over LAN in Linux

I am trying to set up a LAN chat with two users using Linux server and none of them is root. I have tried this two methods: write account_name on both computers And: nc -l port_number on first ...
2
votes
1answer
36 views

Why grep shows different results when I use file1 as a pattern on file2 and viceversa?

When I run grep -m 1 -Fnxvf file1 file2, for some couple of files I get a different line number than running grep -m 1 -Fnxvf file2 file1 (swapped files). Why? I've reduced the files to a minimal ...
1
vote
0answers
16 views

Anybody ever seen a file called .x64HG0B+VC on a Mac? [closed]

I've been looking at a file called .x64HG0B+VC and was wondering what it was...anybody have an answer?
0
votes
1answer
24 views

How can I get just the enum names from a Java file?

Enum files in java can get messy in structure, I'm trying to get Just the Enum names ... import com.mckesson.dex.model.activityLog.concreteFactory.ModifiedPropertyYesNoFactory; public enum ...
1
vote
2answers
68 views

Giving EOF character from command Line

I am reading character from command prompt, and checking for EOF for termination of program. But when I am giving command Ctrl+D it is not taking as a EOF. Kindly specify what to do for it. Ctrl+C is ...
-1
votes
1answer
97 views

What does ls -l | wc do?

I cannot figure out what this command does. It produces 3 numbers in my terminal but with no explanation of what those numbers are. I understand ls -l lists all files in log list format and wc is word ...
10
votes
2answers
503 views

How to redirect the output of a command to an already existing file without deleting its contents? [duplicate]

I am making a backup of some files and am creating a checksum file, checksums.txt, to later check the integrity of my data. However pasting each checksum manually into the file is inconvenient since ...
1
vote
0answers
95 views

How to run full SSD disk check with `fsck` command on system reboot (Debian)?

Please advice how to run full SSD disk check with fsck command on system reboot? (Debian) sdb2 is root, sdb1 is boot partitions. What is recommended options and where to find check report? I would ...
1
vote
2answers
25 views

How can I open the file with the most matches for a given regex?

Let's say I have a directory ~/mydir that has a whole bunch of text files in it. I want to search for searchterm in this directory and then view the file that has the most matches. How can I do this ...
0
votes
0answers
119 views

how to start a new instance of terminal in current terminal window ? (in Redhat)

I'm working on a project to port a windows program to Linux. Is there any command I'm using Redhat to replace the equivilent of the windows cmd /c? (btw, gnome-terminal -x doesn't work for me) cmd ...
1
vote
1answer
91 views

Skip first line (or more) in CSV file which is used to rename files

I have used the info from another question on Stack Exchange to allow me to rename files using the info in a csv file. This line allows me to rename all files from the names in column 1, to the names ...
1
vote
1answer
66 views

How can I safely send email over encrypted connection from the command line?

I found the following related questions on the stackexchange network: stackoverflow - Connecting to smtp.gmail.com via command line serverfault - Using nc.exe (NetCat) to send emails to secured SMTP ...
0
votes
2answers
48 views

I am trying for a tar call and getting the below error

I am trying to use tar and get the following error: $ tar --strip-components=1 xf /data/rvm-latest.tar.gz  tar: You must specify one of the `-Acdtrux' or `--test-label' options Try `tar --help' or ...
0
votes
1answer
23 views

How to take database backup and restore? And how can I view it?

I am using this commands to backup and restore my database mysqldump -u transgenic -p[ramesh] [transgenic] > transgenic.sql mysql -u transgenic -p[ramesh] [transgenic] < transgenic.sql I am ...
1
vote
0answers
25 views

What command line tools can be used to manually perform each step of an entire network “conversation”?

I know, I know; the phrase "network conversation" is imprecise almost to the point of meaninglessness. Let's take this specific scenario: I plug in a computer to a DHCP enabled router, open a browser ...
2
votes
1answer
56 views

Processing table with comma separated values in different columns

I'm trying to do the following for a while but without success. The data I received has comma separated values in each separate columns. The first value in column 6 before the comma is always related ...
2
votes
5answers
180 views

How do you open the UNIX shell?

How do you open the unix shell or UNIX command-line shell on Ubuntu?
0
votes
0answers
15 views

npm installation on linode server

I am trying to install npm on linode server by the command: sudo apt-get install npm -g It says libc-bin libc6 libssl1.0.0 packages will be upgraded, but I am not sure if it is okay to install the ...
2
votes
1answer
44 views

Adding two columns together in CSV and outputting to new CSV file

I have a problem I have been trying to figure out: We have a stock file CSV, which contains the stock in multiple locations. The csv looks like this: ...
0
votes
2answers
51 views

Automatically rerun something with sudo if root needed [duplicate]

I'm running Arch Linux in a virtual machine and it's getting REALLY annoying that since some thing require that I cannot be root, I need to sudo most of my commands. It would be nice if I could do ...
1
vote
2answers
31 views

Position of r before and after k in Sort

I have tried the following two scripts to sort a CSV file $ sort -t"," -k1,1 -k3,3 -k4,4 -k6,6r myFile.csv and $ sort -t"," -k1,1 -k3,3 -k4,4 -rk6,6 myFile.csv I found having the -r before ...
0
votes
0answers
45 views

Add colors to mailx inbox

Is there a way to add color to the mailx inbox. I know there is dircolors and also the bash hex colors. I am not sure if mailx can add some of these tools to colorize replied, purged or forward ...
2
votes
4answers
48 views

how to get a different time-clock on CLI apart from your time-zone?

Is there a way to invoke or know a different clock or time on the CLI. The thing is I'm on UTC+5:30 time but at times need to know time in different time-zones. If there is a CLI way in which this can ...
12
votes
5answers
863 views

How to recall a previous command (without execution) in order to change it?

I can't remember the trick where I could get the last command without running it: let's say I want to be be able to access the command !1255 when pressing the up arrow key and modify the command. So ...
8
votes
3answers
388 views

Command redirection to multiple files: command >file1 >file2 [duplicate]

I have this command: cat somefile >file1 >file2 After I executed this command I can't figure out why file1 has nothing in it. It should have the output of the first file (somefile), but ...
0
votes
0answers
22 views

Installing swftools with dependencies on a server with no internet connection?

I am trying to install a package on a Red Hat server which does not have internet connection by which I could directly download and install dependencies. Where can I download the swftools package ...
0
votes
2answers
38 views

Merge Two files depending on a Column, nth occurrence of a string in the column of file 1 to be merged with nth occurrence

Merge Two files depending on a column, nth occurrence of a string in column1 of file1 should be merged with nth occurrence of the same string in column1 of file2. I tried join but the results are not ...
0
votes
0answers
31 views

Why use use su -c to start background processes?

After reading Link im under the impression that using su -c with & would be redundant. My reasoning is that any process started with su -c will be started in a new shell but it will not be killed ...