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

learn more… | top users | synonyms (1)

3
votes
9answers
4k views

How to generate a year-quarter date from the command line?

I'm interested in outputting a representation of the current year-quarter, as well as the year-quarter for the previous month. If today is 2012 January 1st, I'd like to get 2012q1 and 2011q4 as ...
3
votes
1answer
17 views

Enabling proxy_arp for interface eth2.1

Am trying to enable proxy arp for some of the interfaces, with the normal interface name eth0, eth1, etc [root@eth2.1]# sysctl net.ipv4.conf.eth0.proxy_arp 0 But for interface names such as ...
16
votes
3answers
1k views

Simple way to see the content of directories in Linux/UNIX file systems

In the past, I learned that in Linux/UNIX file systems, directories are just files, which contain the filenames and inode numbers of the files inside the directory. Is there a simple way to see the ...
0
votes
1answer
34 views

Using imagemagick to crop video

I want to crop a video that I have in yuv format using imagemagick. I am using the following command: convert -size 1280x720 my_clip_1280_720s.yuv -verbose -crop 352x288 +repage my_clip_352_288.yuv ...
1
vote
0answers
24 views

Drag-and-drop without the drag

I sometimes need to drag-and-drop files onto an application. (Example — but my question here is not installing Chrome userscripts.) One solution is to use Dragbox, which opens a window from which I ...
0
votes
3answers
59 views

Delete all files that DON'T have duplicate names?

Given a large list of files, containing the following: FILE1.doc FILE1.pdf FILE2.doc FILE3.doc FILE3.pdf FILE4.doc Is there a terminal command that would allow me to remove all files that do not ...
0
votes
1answer
131 views

USB Disk Read-only, cannot format - Turn off write-protection

I have a USB disk which does not allow me to format/mount/unmount or created partitions on it. Using dmesg | tail gives me the following result: I found this post on AskUbuntu and tried using ...
-1
votes
2answers
42 views

Not able to install any package or software on Linux 64-bit

I am using Linux RHEL6 and not able to install any package. [root@linux6 Python-2.7.9]# uname -a Linux linux6.4 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 ...
1
vote
2answers
105 views

apropos regex start with?

I'm trying to use apropos so that I would look for all man pages starting with system. I try: apropos ^system apropos "^system" but these seem to return lines that don't start with system, but ...
0
votes
2answers
7k views

How to add an IP to hostname file

I have a Centos 5.8 server. How can I add my server IP address 192.168.20.254 so that it reflects when I run the command hostname -i At the moment the command only shows the loopback IP 127.0.0.1 and ...
1
vote
1answer
47 views

Viewing Linux Programmer's Manual when mutiple pages bear same name

I want to view the read page of the Linux Programmer's Manual. When I type man read I get the read page of the General Commands Manual. Looking at the man --help I realized I could view all man pages ...
0
votes
0answers
23 views

Retrieving the total bandwidth capacity

I've been looking around for a convenient way to measure the total bandwidth capacity of a *NIX workstation and found a number of monitoring tools here. However, they are of little use in determining ...
0
votes
2answers
67 views

rdiff-backup operation not permitted

Objective I'm trying to execute the following command in my Python script: rdiff-backup --terminal-verbosity=5 --remote-schema "ssh %s -p1019 -i C:/Users/Adam/.ssh/private-passphrase ...
0
votes
1answer
37 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 ...
7
votes
2answers
3k views

What does “--” mean in Linux/Unix command line? [duplicate]

Possible Duplicate: What does “--” (double-dash) mean? git diff [options] [<commit>] [--] [<path>…] In here, how should I understand what [--] means? And when should I use it.
0
votes
0answers
35 views

How do I move files from a disk image using Terminal.

I downloaded an application (LaTeXiT) that installed itself as a disk image. I navigated to /Volumes and into the disk image, but when I try to move the contents to my /Applications folder, it returns ...
4
votes
1answer
147 views

What does `{\} {}` mean in `find` command?

Please explain this command in detail. I am using this command to find large files above 6 MB and split them into 5 MB chunks in the same folder. Then it removes the original files (larger than 6MB) ...
70
votes
27answers
17k views

Quick directory navigation in the terminal

I would like to frequently switch between directories that are in totally unrelated paths, for example /Project/Warnest/docs/ and ~/Dropbox/Projects/ds/test/. But I don't want to type cd ...
16
votes
1answer
5k views

How do we specify multiple ignore patterns for `tree` command?

I need to print the directory structure of our production system and I would like to remove some specific directories from the tree? How do we specify multiple ignore patterns for tree command?
3
votes
6answers
409 views

Grep a file on specific field

I have two files, let's say File1: Locus_1 Locus_2 Locus_3 File2: 3 3 Locus_1 Locus_40 etc_849 3 2 Locus_2 Locus_94 * 2 2 Locus_6 Locus_1 * 2 3 Locus_3,Locus_4 ...
6
votes
5answers
12k views

Use sed to find whole word and replace

I have the following block of text in a file: test3.legacy test4.legacy test3 test3.kami I only want to search for test3 as a whole and replace it with nothing. Unfortunately, all my attempts have ...
2
votes
2answers
68 views

What is a Linux command that lists only USB storage devices?

I would like to list only the USB storage devices connected to my computer. Since these are SCSI disks, I used the command lsscsi, which lists the USB drives as well as my computer's hard drive and CD ...
1
vote
1answer
60 views

tool in terminal like helm-occur/helm-swoop for terminal?

I don't know whether this is the right place to post this question, but if you are not an Emacs user, I'll explain the basic usage of helm-occur/helm-swoop. I like helm-occur/helm-swoop for Emacs ...
0
votes
1answer
52 views

“find” function still print files I've already removed

I've removed some directories and files inside them using sudo rm and sudo rmdir, but when I execute sudo find /*/*/ng* the files I've previously deleted are still showing up, anybody know why and ...
4
votes
2answers
572 views

How do I permanently change the console TTY font type so it holds after reboot?

I'm running Ubuntu 15.04 64-bit Desktop Edition (A Debian based Linux). I used sudo dpkg-reconfigure console-setup from the command line to change the default console font type to Terminus. ...
1
vote
1answer
50 views

qemu command line management

I'm interested in qemu, specifically the kvm feature in Linux which is operated through the command line. I see there are a ton of features available for gnome-boxes and libvirt specifically. My ...
0
votes
1answer
24 views

How does Elinks renders the HTML? [closed]

I like the elinks browser and I would like to know how does it render the HTML into text, using ANSII styles. I suppose there is a library behind elinks to handle the rendering, or it should be. Is ...
0
votes
1answer
53 views

How must (Not how can) a program be available from everywhere in CentOS/Fedora

I was reading this link from MySQL: https://dev.mysql.com/doc/refman/5.6/en/mysql-cluster-install-linux-binary.html shell> cp support-files/mysql.server /etc/rc.d/init.d/ shell> chmod +x ...
-2
votes
1answer
47 views

ls: No such file or directory [closed]

I have been messing around trying to install macvim to a higher version of 7.4. I finally got it working but now I get the error ls: No such file or directory when looking for a directory. I can ...
12
votes
4answers
23k views

pdf to jpg without quality loss; gscan2pdf

When I convert a pdf file to bunch of jpg files using convert -quality 100 file.pdf page_%04d.jpg I have appreciable quality loss. However if I do the following, there is no (noticeable) quality ...
5
votes
1answer
271 views

Logging bash output to a file

I'm trying to build vlc which is rather complicated and dependent on having the right packages installed, and keeps choking on errors. To trace all my steps I wish to output what I'm doing to a ...
1
vote
1answer
35 views

Accessing root files on Ubuntu Phone from my eOS based on Ubuntu

I'm wondering if its possible to access the root files on my Ubuntu Phone E5 from my computer. I know I can access them from the terminal on the phone but its not ideal using that touchscreen to ...
15
votes
4answers
2k views

What does “are you root?” mean?

This is what I keep getting: ascendermedia@magic2tower:~$ sudo apt-get install flashplugin-installer bash: sudo: command not found ascendermedia@magic2tower:~$ sudo apt-get install ...
0
votes
1answer
38 views

Copy directory on destination machine during .deb installation in Ubuntu 14.04, 64 bit

I just want to copy directory (which contains some files) on destination machine during .deb installation at path /opt/myProjectName in Ubuntu 14.04, 64 bit. I am successfully able to install files ...
5
votes
3answers
12k views

Example xfreerdp usage with clipboard plugin

FreeRDP 1.0.2 has an updated their parameter syntax for "better interoperability with Windows." I had a problem using the old syntax where the clipboard plugin only worked the first time I pasted, ...
7
votes
4answers
532 views

How to grep-inverse-match and exclude “before” and “after” lines

Consider a text file with the following entries: aaa bbb ccc ddd eee fff ggg hhh iii Given a pattern (e.g. fff), I would like to grep the file above to get in the output: all_lines except ...
20
votes
9answers
1k views

How to tell what type of filesystem you're on?

Is there a command to tell what type of filesystem you're using?
4
votes
4answers
928 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 ...
141
votes
16answers
89k views

How to do integer & float calculations, in bash or other languages/frameworks?

Using echo "20+5" literally produces the text "20+5" What command can I use to get the numeric sum, e.g. 25 in this case. Also, what's the easiest way to do it just using bash for floating point, ...
1
vote
1answer
46 views

Using apropos command with -a to search multiple keywords on CentOS 7

I'm running CentOS 7.0 build 1503. I'm trying to search for commands I don't know the name of by searching the man descriptions for multiple keywords using AND (e.g. search for a command containing ...
0
votes
1answer
55 views

How to kill only current process and continue with shell pipe-line?

I have 2 related Doubts about Bash. (Q1) Consider tail -f SomeFile | wc, a fictitious command-line, where tail is used to simulate a command (C1) which runs for a long time, with some output from ...
26
votes
5answers
17k views

Filtering invalid utf8

I have a text file in an unknown or mixed encoding. I want to see the lines that contain a byte sequence that is not valid UTF-8 (by piping the text file into some program). Equivalently, I want to ...
0
votes
3answers
95 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?
2
votes
1answer
62 views

What does blkid stand for?

What does the command blkid stand for? I want a way to remember it. Also, what is it often used for?
8
votes
2answers
87k views

Installing git “sudo: apt-get: command not found”

I am trying to install git. I run the following command: sudo apt-get install git-core git-gui git-doc But receive the following error: sudo: apt-get: command not found What should I do?
0
votes
0answers
23 views

How to make a background service to capture commands and their output?

Is there anyway to make a background service capture all the commands executed by a user and also save the output in a text file?
8
votes
6answers
6k views

Terminal-based spreadsheets and wordprocessor?

Are there any (good) terminal based (ie. runs in a VT, not in GUI/X) spreadsheets or wordprocessors for Unix/Linux? Can anybody remember the name of such programs which were popular before (eg. ...
1
vote
1answer
86 views

How to get last N commands from history?

I want to see what are the last N commands in my history. I thought history | tail -n 5 would make it, but I noticed that a multiline command counts for as many lines as it has. $ echo "hello how are ...
4
votes
4answers
194 views

How can I convert two-valued text data to binary (bit-representation)

I have a text file with two (2) only possible characters (and maybe new lines \n). Example: ABBBAAAABBBBBABBABBBABBB (Size 24 bytes) How can I convert this to a binary file, meaning a bit ...
3
votes
1answer
55 views

Background color whitespace when end of the terminal reached

I am working with control sequences for text formatting and have stumbled upon some unexpected behavior. I have some text to output, in the middle of this text there is some smaller text block ...