General :: Unable To Get The Ls Command To Work Exactly
Jun 15, 2011
I am have trouble getting the ls command to work exactly how I want, for example, sometimes I want to list the contents of a directory into a text file by command:
Code:
ls directory > list.txt
(assume the only objects the directory contains are files with extension .dat eg file1.dat, file2.dat, ...)sometimes I want the relative path of the files prepended to them in my text file eg:
path/file1.dat
path/file2.dat
path/file3.dat
[Code].....
It feels like ls is unpredictable in this regard - sometimes it prepends the path and sometimes it doesn't and sometimes it adds both entries (with and without the path prepended into the text file)....How can better control the way ls works?
View 2 Replies
ADVERTISEMENT
Oct 5, 2010
Code:
nnjond@nnjond-den:/$ cd /media/disk/Dual_Data/
nnjond@nnjond-den:/media/disk/Dual_Data$ ls
07_Magna_DOWNLOADS 21_TEMPS Peleas.htm
08_Self-Improvement 22_Desktop Pelleas.odt
[code]....
View 6 Replies
View Related
Jun 30, 2010
Im not getting able to neither add new users using command useradd nor delete existing users using command userdel. And even Im not getting able to login into any existing users except root. It was ok before. Im having this problem very recently on my linux server. Im using RHEL5.
View 9 Replies
View Related
Jun 10, 2011
I used SVN to check out the code of an open source project. When I typed the following command:
[user1@smallfox]~/workspace/project1% svn co http://svn.apache.org/repos/asf/mahout/trunk
It worked just fine. However, when I typed the SVN command in the root directory, it did not work and gave me an error message:
[user1@smallfox]~% svn co http://svn.apache.org/repos/asf/mahout/trunk
zsh: command not found: svn
View 1 Replies
View Related
Aug 11, 2010
I use the 10.04 ubuntu, somehow I did something and now the apt-get install command doesn't work. No matter what package I try to download, there's always a "couldn't download all packages run update or --fix...." message. When I scroll up I see that it downloaded some packages but it couldn't find them all. So I thought that I should try a different server. I googled it and found that the server's address is stored in /etc/apt/sources.list. I edited that file and replaced all the deb and deb-src lines with the server's address. I saved that but when I tried to download something (like vlc) I got a "E: Couldn't find package vlc" message. I also tried many different server's but there was no difference. Am I doing it wrong? Should I run a command after editing the /etc/apt/sources. list file? Or didn't I edited the file right?
View 4 Replies
View Related
Jul 6, 2011
I don't know why --exclude doesn't work when I use tar command. Please see this code
Code:
mahmood@pc:~$ l a/
1.txt 2.txt 3.txt b/
mahmood@pc:~$ tar cvjf compressed.tar.bz2 --exclude=/home/mahmood/a/b/ a/
a/
a/2.txt
a/1.txt
a/3.txt
a/b/
mahmood@pc:~$
As you can see although I excluded b/ but tar command ignored that.
View 2 Replies
View Related
Jun 3, 2011
I'm running this command, and seems not to work, following the command:Quote:for nic in `ls /sys/class/net | grep -v lo`; do echo ${nic}; udevinfo -a -p /class/net/{nic} | grep -i address; doneThe output is the following:Quote:eth0eth1But the output should show something like this: (showing the MAC address)uote:
View 6 Replies
View Related
Jul 29, 2010
Top: error while loading shared libraries: libproc.so.2.0.6: cannot open shared object. I am not able to execute top and ps command.
View 6 Replies
View Related
Feb 19, 2011
I am teaching using an Ubuntu 10 server. The course stipulates the students use the mail command to send me assessment work, however I can't get mail to work (I did have to install it in the first place). After I end the message with a dot I get the message "send-mail: cannot open mail:25".
View 7 Replies
View Related
Aug 13, 2010
-cd command of urxvt doesn't work
View 1 Replies
View Related
Sep 26, 2010
i am using rhel 5.4..today i type the command setup! is not workERRor: error while loading shared libraries: libslang.so.2: cannot open shared object file: No such file or directory
View 5 Replies
View Related
Oct 17, 2010
I want to install some software using sudo apt-get command,but it dosen't work.(my network works well) how to handle it? below is the output of terminal:
@ubuntu:~/Downloads$ sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4
Reading package lists... Done
Building dependency tree
[Code].....
View 4 Replies
View Related
Apr 3, 2011
I have a Linux machine which I set up for my personal use at home. I installed Fedora Core 11 a long time ago, and recently I noticed that I am not able to log in as root (I didn't realize this issue until recently since I always have been logging in as a user account that I created during the FC11 installation).When I login as a user account instead of root, I can use the su command with the password I set up for the root account. Even when I'm in GUI mode and try to make changes to the system from the user account, the GUI asks to enter the root password, and I type the password I set for root and it works. However, if I boot the machine and try to log in the system as root, password that I set up is rejected.
I'm very puzzled with this problem because with my limited knowledge on Linux system, I thought the root password and the su password are the same (i.e. when you install Linux OS, you set the root password, and you use the same password for using the su command). I do not know exactly when this problem started, but the only thing that I can think of as a cause of this issue is that I once changed the root password from GUI using System > Administration > Root password since the system one time complained about the low security strength of the root password.
View 6 Replies
View Related
Feb 7, 2010
I am unable to launch gcc through command terminal.I am using red hat platform.
View 4 Replies
View Related
Jun 25, 2010
I am trying to use yum command to install mysql and php but I get the following error
yum install php Loading "installonlyn" plugin Setting up Install Process Setting up repositories Could not retrieve mirrorlist [URL]...[Errno 14] HTTP Error 403: Forbidden Error: Cannot find a valid baseurl for repo: base
[code]...
View 4 Replies
View Related
Jul 1, 2009
When in command mode one can come out of the file temporarily by Code: :sh in command mode. When I find myself on the shell on RH 9 the aliases dont work but in RHEL 4 all aliases work like charm. Does anyone know why is it so?
View 4 Replies
View Related
May 7, 2010
I can make aliases fine by editing the .bashrc file in my home directory, but the first thing I do when I open a terminal window is sudo su so I don't have to type sudo in front of every command. The problem is, I am then not able to use my aliases. How can I make aliases that work after I run the sudo su command?
View 2 Replies
View Related
Oct 29, 2010
I have a PDF that I built using BIRT, and that works fine. At this point I'm trying to print it using lpr or some other command. It seems as though I should just be able to type lpr invoice.pdf and it should print to the default printer. However, lpstat -t shows "Empty print file!" for the printer, and the printer doesn't do anything, let alone print the file. lpr -l invoice.pdf prints the file, but unformatted - just a bunch of characters and whitespace on a seemingly infinite number of pages.
View 2 Replies
View Related
Jun 3, 2010
Once upon a time when I started sqlite from the command line I could using the tabbing autocomplete to enter the database name. This has not worked for a while now.
View 1 Replies
View Related
Jun 30, 2011
My GUI for backtrack is not working. I want to connect to internet. I gave the required static ip to my machine. but the problem is I have to give username and pasword through the browser before accessing the internet. Now here , i dont have any browserHow to give the log in credentials through command line in backtrack machine?
View 1 Replies
View Related
Jan 29, 2010
I am just trying to print the timestamp. which is not working.
#!/bin/bash
TSTAMP= date '+%d.%m.%y-%H:%M:%S'
echo "${TSTAMP}"
It is not displaying anything. What is wrong with the above commands.
View 3 Replies
View Related
Sep 17, 2010
Im having trouble setting up my internet connection.I have cable internet. The laptop is connected directly to the modem (no router, no wireless).I just installed suse 10.0 from dvd onto my laptop.When I use YAST to go network devices->network card, an Ethernet card is detected.
View 14 Replies
View Related
Feb 4, 2010
Code:
This won't work in a script but it WILL work on the commandline...
Here is my output when I try the script:
Code:
Also, what is the at the end of the path in the error?
View 3 Replies
View Related
Mar 21, 2011
I've tried another forum to get help but I'm still unable to wireless to work on this laptop.
View 4 Replies
View Related
Jan 14, 2010
When i use the shutdown-command in the terminal as root, it nearly works. It starts to shut down, and it looks like all programs and the kernels shuts down. I end up with a black screen, sometimes with the ubuntu-logo on, but it never powers off. I have to force it off by holding the power button. When i use the graphical interface to shut it down, it works perfectly. The poweroff-command works without problem too.
Here is the command i use:
Code:
View 4 Replies
View Related
Apr 3, 2011
CUPS was not originally installed on my server, I have installed it but cannot print to my network printer. On my laptop, I can... they are both running the same version of Debian. What could be missing?
Here are some details...
I have two computers running the same version of Debian. One is a server with no GUI and the other is my laptop with GDM installed. My laptop (which prints with no problem) is connected via Wifi. My server is connected directly to the router via Ethernet. I cannot print from the server.
The printer is a Canon Pixma MP495 that connects to the router via Wifi. I have downloaded drivers for the printer from [url] and installed them successfully using dpkg on both computers.
Right now I have a regular text file that I am using for a test page. To print from my laptop (with success) I type:
Code:
This does not work from the server. What could I be missing?
lpq run on server:
Code:
lpinfo readout:
Code:
View 14 Replies
View Related
Nov 3, 2010
I'm trying to figure out how to operate a rather large Java program, 'prog'. If I go to its /bin/ dir and configure its setenv.sh and prog.sh to use local directories and my current user account. Then I try to run it via "./prog.sh start". Here are all the relevant bits of prog.sh:
[code]...
When I actually do ./prog.sh start, it starts. But I can't find it at all on the process list. Nor can I kill it manually, using the same command the shell script uses. But I can tell it's running, because if I do ./prog.sh stop, it stops (and some temporary files elsewhere clean themselves out).
[code]...
the process is running yet not in any way listed by the system. I can't find it in ps or /proc/, nor can I kill it. But the shell script can still stop it properly. So my question is, how can something like this happen? Is the process supremely hidden, actually unlisted, or am I just missing it in some fashion? I'm trying to figure out what makes this program tick.
View 2 Replies
View Related
Aug 25, 2009
I am unable to start apache on my linux machine with following errors Starting httpd: Syntax error on line 117 of /etc/httpd/conf/httpd.conf: Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration I am using CentOS5 with apache version httpd-2.2.13
View 99 Replies
View Related
Jan 26, 2010
How, using the command line can I detect my wireless card and make it work under SUSE Enterprise Desktop? The wireless card works in Win XP.
View 8 Replies
View Related
Nov 28, 2010
" Mark the start of the text with "v", "V" or CTRL-V. The character under the cursor will be used as the start.""With CTRL-V (blockwise Visual mode) the highlighted text will be a rectanglebetween start position and the cursor."I can mark the start with "v" or "V".But it doesn't work when I push ctrl+V.
View 14 Replies
View Related