Ubuntu :: Short Path On Command Line?
Mar 1, 2011
I have a quick question: how can I make the path short on the console? My problem is that if I descend 10 levels in a directory tree, the path becomes so long that it takes more, than one line of the console window. Is there a way to shorten it, and show only the name of the current directory, without the whole path, i.e., instead of
Code:
v923z@penguin: first/second/third/fourth/fifth/sixth/seventh/eighth/ninth/tenth>
only
[code]....
View 3 Replies
ADVERTISEMENT
Apr 29, 2011
Some of my short cut keys seem not ot be working. Ex Alt +F2 dose not open a pop up command line. Also would like to add some short cuts. Like Ctrl + Alt+ Backspace for reboot. I went to the short cut app and I can add a short cut key, name it, but can't seem to figure out how to assign it a function. Didn't seem intuitive to me. I'm using the UNE version on a asus eel 1000.
View 1 Replies
View Related
Aug 12, 2010
Is there a command line option that will allow less to return to the command line if there are not sufficient lines in the file to warrant paging.
View 1 Replies
View Related
Oct 6, 2010
i need to write a short script that will compress a specific folder that`s on the Desktop (and all it`s content) and also will encrypt it with a password that is inside the script --->meaning it wont ask for a password+verification when compressing+encrypting
View 1 Replies
View Related
Aug 24, 2010
I need to add a network path to a configuration file, but I can't figure out how to write the path.
The command dir \computernamesharename works in a Windows command line.
ls //computername/sharename/ does not work under Linux. ("No such file or directory.") ls smb://computername/sharename/ does not work either.
Nautilus shows the location as smb://computername/sharename/, and I can read and write in the shared directory, so it's mounted and I have access.
So how do I get it to work? How do I specify the path so a command line will recognize it?
View 3 Replies
View Related
Jul 24, 2010
For example, I always go to this path:
/user/something/somefolders/somewhere
but I don't want to type
cd
/user/something/somefolders/somewhere
in the terminal all the time, can I have some short hand to do so? for example, can I do something like
cd commandPlace
to replace the path?
View 5 Replies
View Related
May 13, 2010
We have two paths. First one is directory, second either dir or file.
/a/b/c and /a/d/e.txt
Relative path from first path to second will be: ../../d/e.txt
How to get it in linux terminal?
PS: For those who ask "what is use case?" - creating lots of relative symlinks (just as an example)
View 1 Replies
View Related
Dec 14, 2010
How can i write a shell script that takes a file path as command-line arguments.and it should report whether the path denotes a file or a directory.
View 2 Replies
View Related
Jul 12, 2011
kernel 2.6.21.5, slackware 12.0
GNU bash 3.1.17
Code:
As you can see, /usr/local/bin is in the path. However, bash does not look for nasm in /usr/local/bin.
If I am root, things go well:
Code:
View 16 Replies
View Related
May 29, 2010
i've gotten my fedora 12 to the point where i can run python3 scripts from command line and can call up python 2.6.2 idle with the command 'idle' from command line. what command will call up python3 (3.1.2 to be exact) idle?
View 5 Replies
View Related
Jan 20, 2011
In windows command prompt, F8 key can cycle through your previously entered commands i.e say you enter "ping google.com" and then "pushd <dir>". Next when you type p and then press F8 brings pushd and next F8 brings ping command. You can then hit enter to execute the corresponding command i.e ping in this case.Is there anything similar in Ubuntu Terminal running bash? Very handy to get back previously entered commands.
View 3 Replies
View Related
Jan 18, 2011
I would like to copy a file from some random folder and send to a "Test" folder in root directory. But I havn't found how to specify the root directory without using ../ until i reach the root directory.i.e. suppose I'm in my random folder where I want to copy my file sudo cp somefile.txt (root???)/Test
what do i put for root?Just as additional explanation, if I have a Test folder in my home directory that i wanted to transfer to, then i could simply do cp somefile.txt $HOME/Test.
View 2 Replies
View Related
Jun 25, 2010
the short file descriptor of an ISO file. I have been assigned with a task to match the short file descriptor of an ISO file(to be provided to the customer) to check if thats "Kudgo Support tools" or not.What linux command should I use?
View 6 Replies
View Related
Jun 14, 2011
When I add some path in .bashrc by commenting out old path and adding new one like this:
#EXPORT HOME_PLAY=/home/gem/old_play
EXPORT HOME_PLAY=/home/gem/play
EXPORT PATH=$PATH:HOME_PLAY
After saving above changes, I enter the command: source ~/.bashrc Now if I do echo $PATH, the path shows both the old PLAY_HOME and new PLAY_HOME. This is really bad and messes up a lot of things in my project. This problem only goes away if I logout or reboot, a rather very long process. What is happening is that the old path is added to new path element and the old path includes the old path element you want to remove.
View 10 Replies
View Related
Dec 9, 2010
I have a many text files that have XML tags all shoved into 1 line. I want to create a new file that splits each XML tag onto a new line. code...
View 3 Replies
View Related
Feb 24, 2011
I'd like show a certain line or lines of a file with context, kind of like a unified diff, on the command line in Linux:
$ (something) -l 154 stuff.py
150: def foo(bar):
151: """
[code]....
View 5 Replies
View Related
Aug 22, 2011
How can I print Linux command line history without including the line numbers? I want to send it all to a text file like this:history >> history.txt
View 1 Replies
View Related
Mar 26, 2011
I know my way around MS Windows much better, but I just don't feel right trying to program something for Android on a Microsoft operating system. I am interested in Android programming so I followed the instructions on [URL] to install the environment on my computer...
I just installed the JDK, SDK, Eclipse successfully (or I assume):
* When I get to Step 4 where I'm supposed to run 'android' it will not run. I get the error message "android: command not found" (I am definitely in the right directory).
** When I double-click it in nautilus, it opens up in gedit. I can set the permissions in nautilus (through the properties - Allow executing file as a program) and get it to work,
My system:
Intel i7
Ubuntu 10.10 Maverick Meerkat
android-sdk-linux-x86
eclipse 3.6.2
View 5 Replies
View Related
Feb 17, 2010
how to pass something more than a one-command startup for gnome-terminal. I will give an example of what I'm trying to do here:
Code:
#! /bin/bash
#
#TODO write this for gnome and xterm
[code]....
This same error occurs if the gnome-terminal line is changed to
Code:
gnome-terminal -e mcTerm
Is there any way to pass more than one command on to gnome-terminal? I have tried various single and double quoting senarios and in a final attempt, I abstracted to an exported function all to no avail. Perhaps even though gnome-term is better at many things than xterm, xterm trumps it in this instance.
View 1 Replies
View Related
Jan 20, 2010
On my Ubuntu server I'm running into an issue that I've never seen before even though I've been using Linux for many years. Basically sudo is not finding a command located in my path. Here is a transcript illustrating the problem.
Code:
prg ~: echo $PATH
/opt/ruby/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
prg ~: sudo echo $PATH
[Code]....
View 7 Replies
View Related
Jun 18, 2010
Code: cmd='date | wc'
$cmd If this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument".What is meant by expansion of pipe. When we execute date | wc on the command line, it goes fine.then | is not treated as an argument. Why?
View 4 Replies
View Related
Apr 30, 2011
I installed the Berkeley DB on the Ubuntu server and tried to access the dbxml from the command line and it returns command not found
path/to/dir/dbxml-2.5.16/install/bin$dbxml
-bash" dbxml: command not found
Can someone point me in the right direction
View 1 Replies
View Related
Oct 25, 2010
I tried
Code:
chown -R owner:group *
which does not work on the invisible directories (why?). When I used ".*" as wildcard it changed all (visible) files including the parent directory (the one I was currently working in which is the "dot") . I can change the invisible directories owner and group using dophin but how is it done from the command line?
View 9 Replies
View Related
Feb 16, 2010
I am trying to learn how to pass more than a one-command startup for gnome-terminal.
I will give an example of what I'm trying to do here:
Code:
#! /bin/bash
#
#TODO write this for gnome and xterm
USAGE="
${0##*/} [-x] [-g]
code....
However, running with the -g option to invoke gnome-terminal, I get a "There was an error creating the child process for this terminal" error.
This same error occurs if the gnome-terminal line is changed to
Code:
gnome-terminal -e mcTerm
Is there any way to pass more than one command on to gnome-terminal? I have tried various single and double quoting senarios and in a final attempt, I abstracted to an exported function all to no avail. Perhaps even though gnome-term is better at many things than xterm, xterm trumps it in this instance.
View 4 Replies
View Related
Jan 16, 2011
I found the following function in /etc/profile file.
[Code]...
1. I dont undestand what "if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)"" this if statement actually comapres??
2. Also what is the difference between PATH=$PATH:$1 & PATH=$1:$PATH
View 14 Replies
View Related
Oct 15, 2010
I'm trying to convert this awk command from command line into an awk script, but just cannot get it to work:
This is what i have after my BEGIN
Am i missing something here? this just prints out the count for everyline, not counting lines on 5th field that match 'A'
View 1 Replies
View Related
Mar 27, 2010
I have installed jdk1.6_0_0 to kubuntu 8.10. But javac command doesn't work yet.
How do I set path?
Here are the outputs i got from typign some commands
View 6 Replies
View Related
Dec 20, 2010
I tried to install JRE to my remote Suse 11 SP1 linux.After i finished with files i typed like
export PATH=<my jre path>
now i have no bash commands - typing ls causes
-bash: ls: command not found
i think that i should re-export my PATH to the right value but i don't know what it should be. I tried differend values
/etc/profile
/usr/bin
View 3 Replies
View Related
Oct 15, 2010
When I run "netstat -a" commnand, it display:
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 20269 /tmp/.gdm_socket
...
unix 2 [ ] DGRAM 997161
unix 3 [ ] STREAM CONNECTED 942628 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 942627
unix 3 [ ] STREAM CONNECTED 942626 /tmp/.X11-unix/X0 ....
Why some socket don't have Path name? And what mean's RefCnt = 2?
View 2 Replies
View Related
Mar 3, 2011
For example, what I have now as a root user on CentOS 5.5:
# setsebool
bash: setsebool: command not found
I need to enter /usr/sbin/setsebool to get it working
The same is with some other commands:
# service httpd restart
bash: service: command not found
And so on. I know, that I need to add path somewhere, as I did it before on FreeBSD. But I don't know where?
View 2 Replies
View Related