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

learn more… | top users | synonyms (1)

0
votes
1answer
29 views

error ./c.sh: line 24: [: too many arguments in shell program

I am trying to make a shell script to print the amount of time user was logged into the system but I encountered a too many arguments error. I tried many methods from the internet but none worked. ...
1
vote
2answers
23 views

Jump to specific flag in help/man file

Let's say I'm curious about what a specific flag -T means for a command ls? Is there a way to jump straight to that using man ls...? or, and this is a slightly different question because it's not ...
-2
votes
1answer
52 views

how to delete swarm of ._ files using commandline

I have these files in MAC which have weird ._ character before filenames/folders. Which I want to delete in one shot. Is there a way to do it in commandline? eg. ._js ._css ._image if I go into ...
5
votes
4answers
538 views

How to print the name of missing files in a folder?

I have 2000+ files in a folder, but there are few files missing from the folder. Name of the files are like GLDAS_NOAH025SUBP_3H.A2003001.0000.001.2015210044609.pss.grb ...
2
votes
0answers
18 views

Turn off the backlight of an external monitor

Is there a command-line way to turn off the backlight of an external monitor connected to laptop through HDMI? This works on laptop's monitor: echo 10 | sudo tee ...
0
votes
1answer
37 views

Change hostname on SUSE Linux Enterprise Server 11 SP3 for VMware

I want to update the hostname for one of my VMware virtual machines running SUSE Linux Enterprise Server 11 SP3 for VMware . I tried changing the hostname using YaST but after reboot the old name ...
0
votes
2answers
38 views

Live monitoring of background jobs

I executed a command like this: nohup some_command &. Now this command is in the background. I can see it with the command jobs. Example output: [1]+ Running nohup some_command ...
1
vote
1answer
47 views

Get executable for any command [duplicate]

I want to know which executable gets executed for any command in bash. Example: I have firefox installed here /usr/bin/firefox, it is in the $PATH alias browser=firefox alias br=browser Now I ...
0
votes
0answers
35 views

Man-pages don't include all relevant information

Consider the man-page of this function: sysconf It doesn't have all the information that I need (e.g. all the system variables to be queried). This is an example of what I need: ...
2
votes
1answer
37 views

bash on command event (or shell)

Is there a way to capture all commands executed in a bash or even better in sh? I need a wrapper script that gets called everytime a command is executed. Like when I type cd /home/ I want my ...
1
vote
1answer
62 views

Custom GUI without desktop environment

I want to set up a custom Linux OS primarily for hobby and learning use. It doesn't need a desktop environment, but I do want to at least customize the visual appearance of the window manager and ...
0
votes
0answers
26 views

Error installing java on Virtual Machine

I am trying to deploy a server app (BaasBox) to Google app Engine BaasBox requires java 1.6 or higher to execute. when I check for java on the virtual machine using java -version, I get this: ...
1
vote
2answers
25 views

Randomly copy certain amount of certain file type from one directory into another

Sometimes I have a folder full of jpg's and I need to randomly choose 8 or so of them. How could I automate this so my account randomly chooses 8 jpg's from the folder and copies them to another ...
2
votes
2answers
46 views

Seems like some basics are missing from ubuntu…or I haven't set them up?

I can't define a shell variable like so: $a = "hello" echo $a echo a $a a all lead to nothing. Also, this command doesn't work for me: $ echo "HELLO HOW ARE YOU?" | tr '[:upper:]' '[:lower:]' ...
1
vote
1answer
43 views

tar in parallel [duplicate]

I have a directory with several hundred sub-directories. I want to tar and compress each sub-directory and name the resulting file <currentDirName>.tar.bz2. I have done: find ./dir -type f ...
1
vote
1answer
18 views

Application [AWS CLI] Command shortcuts are not working globally

I just installed AWS CLI on a few servers with Ubuntu 14 on. The last server I installed it on, cannot access the AWS CLI from the terminal and run commands. This does not work: aws --version You ...
0
votes
2answers
92 views

Dynamic change of Linux root password everyday

I want to change my root password everyday based on the date. The password will be like a combination of a string and the date. The below code is working fine. echo -e "pass"$(date ...
0
votes
1answer
18 views

How do I read from memory.pressure_level in a cgroup?

I want to see the memory pressure of the cgroup. But simple cat memory.presure_level fails. How do I know the current memory pressure of a cgroup?
1
vote
2answers
24 views

How can I properly escape a string to be passed to a shell with a command argument [duplicate]

How can I properly escape arbitrary commands? For example: sudo -u chris sh -c 'echo "\"leftright\""' The above echos: "leftright" How would I echo out: "left'right" I've tried the ...
2
votes
2answers
104 views

Redirect output of less utility to a file

Here is what I did less -N file1 > file2 what I want is writting file1 into file2 with line-numbers option. But I failed with that. Any suggestion to do that? Why I failed to do it? Thanks.
0
votes
3answers
70 views

Search for string(s) in files and report four lines of context (match and three following)

I have a string (or a list of strings) that is/are to be searched in all the files of a directory.  For example, if I am searching for ABC, and file1.txt contains ABC on line 6, then I want lines 6, ...
3
votes
1answer
64 views

How to open any file through the command line?

I would like to know if there is a command to open any file in Linux independently of their extension, just as if you were double-clicking it.
0
votes
2answers
30 views

Timing start up time for app launched via terminal command

I'd like to see how long it takes a certain app to fully start. Is there a way to do this launching the app via terminal using some command?
2
votes
2answers
47 views

How to move files to files with same name, but different extension

I have a folder A with many small files. In the parent folder there are many folders with other files in them. now in folder A there are files that have the same name as in the other folders, but they ...
15
votes
3answers
952 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 ...
2
votes
1answer
72 views

Unable to get back to bash prompt after strange command

I was messing about with different wildcards and ran the following command: ls testdir/!(*/) after which I was completely unable to get back to the bash prompt. None of ^C, ^D, or even ^Z worked: ...
0
votes
1answer
21 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
18 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
58 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 ...
3
votes
1answer
15 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 ...
-1
votes
2answers
31 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 ...
0
votes
1answer
60 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
vote
2answers
98 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
0answers
22 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 ...
1
vote
1answer
33 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
2answers
43 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 ...
1
vote
4answers
156 views

Grep for a string in file without using pipe

I want to grep for a word in a file in the last n lines without using the pipe. grep <string> filename enables to search the filename for a string. But, I want to search for a string in the ...
0
votes
0answers
28 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 ...
2
votes
2answers
55 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
votes
0answers
38 views

Zip all files in directory with specific extension

I want to zip all .sql files in a directory. I try to select the sql files using the wildcard for the filename but the following fails: zip compressed.zip /projects/backup/*.sql It returnszip ...
3
votes
6answers
345 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 ...
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 ...
1
vote
1answer
36 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
18 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 ...
-2
votes
1answer
44 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 ...
5
votes
1answer
146 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 ...
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
34 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 ...
1
vote
1answer
25 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 ...
7
votes
4answers
362 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 ...