General :: Configure The Way Bash Completes Directory Names?

Sep 7, 2011

I'd like to instruct bash to use a special method to perform completion on certain directory names. For example, bash would call a program of mine to perform completion if a path starts with "$$", and perform completion normally otherwise. Is this at all possible? How would you implement it? The goal is to allow autojump to complete paths for all commands when the user starts them with a certain prefix. So for example when copying a file from a far directory, you could type: cp $$patern + <Tab>

and autojump would complete cp /home/user/CompliCatedDireCTOry/long/path/bla/bla and you would just have to add where you want to put the file. Of course I can use ott's comment to add it to a few specific commands

View 3 Replies


ADVERTISEMENT

General :: File Names And Tilde--not For Home Directory--in Bash?

Jun 6, 2011

I understand the tilde (~) at the end of a file displayed in bash is a backup file in the Linux file system. Is there a way to keep these hidden when listing the contents of a directory?

View 2 Replies View Related

Programming :: Getting Directory Names From A Given Path In Bash?

Apr 11, 2009

I am programming in bash and really stuck finding directory names. I have a script to find all the .php files on my / partition which will return the whole path. Is there a way to print directory hierarchy with all those values leaving out the forward slashes.

View 10 Replies View Related

Ubuntu :: Bash: ./configure: No Such File Or Directory When Run The Command ./configure --prefix=/usr

Apr 4, 2010

I am trying to follow this tutorial below so that I can get Text to the right of icons on the GNOME desktop. [URL] Everything so far has worked fine, except when I get to step 3 where I compile Nautilus. When I try to run the command ./configure --prefix=/usr It tells me bash: ./configure: No such file or directory

View 5 Replies View Related

Ubuntu Installation :: Configure Autoclicker In The Terminal - "bash: ./configure: No Such File Or Directory?

Mar 19, 2011

I found a tool made for Ubuntu called Xautoclick. I downloaded it and it is called "xautoclick-0.30.tar.gz" The installation notes say "tallatBe sure you have the proper development packages for your distribution installed (i.e. something like xserver-xorg-dev, gtk2-dev, et cetera). After that, run:

./configure make sudo make install" I have no clue what to do... I typed in "./configure" in the terminal and it says "bash: ./configure: No such file or directory?

View 3 Replies View Related

General :: Configure Bash Prompt To Show Current / Parent Directory Only

Oct 15, 2010

I would like to modify Bash Prompt so it does not show the whole $PATH but just the current and parent directory. I am using Ubuntu.

View 3 Replies View Related

Software :: Unable To Compile Gnome Commander - Bash: ./configure: No Such File Or Directory

Feb 2, 2011

I have downloaded the latest gnome commander source code from the gnome commander home page. Following the instructions in the readme I have extracted it from the tar ball and changed to the top level directory of the source code. I execute ./configure and get a bunch of "checking" results.

Quote:

bash: ./configure: No such file or directory
ken@ubuntu:~/Desktop/gnome-commander-1.2.8.9/src$ cd ..
ken@ubuntu:~/Desktop/gnome-commander-1.2.8.9$ ./configure

[code]....

I find Makefile.am and Makefile.in present in the directory. I generally install from deb packages. Still, I don't think it should be this hard to compile a package given the seemingly simple directions provided.

View 4 Replies View Related

Ubuntu Installation :: Installation Of Tar.gz - Get To The ./configure Step It Says "bash: ./configure: No Such File Or Directory"?

Jun 5, 2011

I want to install a program from this website http:[url].... and i download the option " hydra-6.3-src.tar.gz".i tried following the instructions on this page: https:[url].... but when i get to the ./configure step it says "bash: ./configure: No such file or directory"

View 9 Replies View Related

General :: Concatenate Variable Names In Bash?

Apr 7, 2011

In my script, and I would like to concatenate 2 variables names, to give me the true variable.I've 3 variables X1, X2 and X3, and I invoked them inside a for loop.

Code:
#!/bin/bash
X1=HELLO

[code]....

View 4 Replies View Related

General :: Bash Script To Categorize Folders On Similar Names?

Oct 10, 2010

Any script to categorize folders with similar name into one directory. For example: There are 4 directories named LinuxFedora, LinuxUbuntu, WindowsXP and Windows7. The script should be able to create two folder named Linux and Windows wheree respective directories are moved.

Next example: If there are many folder as below:
DevLys 010
DevLys 010

[code]...

View 1 Replies View Related

General :: How To Change Same File Names Directory Wise

Apr 9, 2010

I have a problem with file names changes. I have a hundred of file with same names and different subdirectories. I want to change that file names by their subdirectery names.

Currently is:
file name------------------------subdirectory name
1_km_16_days_EVI_s2_01200_01200.img --> MOD13A2.A2000049.h23v03.005.dir
1_km_16_days_EVI_s2_01200_01200.img --> MOD13A2.A2000065.h23v03.005.dir
1_km_16_days_EVI_s2_01200_01200.img --> MOD13A2.A2000081.h23v03.005.dir
...

I want to
MOD13A2.A2000049.h23v03.005.img
MOD13A2.A2000065.h23v03.005.img
MOD13A2.A2000081.h23v03.005.img

View 3 Replies View Related

General :: Mounting CDROM With File And Directory Names In Uppercase?

Mar 25, 2011

We have an application that on a SCO box that we are converting to Linux.Basically it mount a CDROM drive and pulls data files off of it. We can mount the drive and it displays all the file/directory names in uppercase. Is there a way to do it in Linux?

View 2 Replies View Related

Software :: List Files/directory Names Without Directory Contents?

May 3, 2011

When I run "ls -al somedir*" (I use the "ll" shortcut, actually), Linux not only list files that match, but also the contents of directories whose name also happens to match.Is there a way to limit "ls" so that it will only show names (files and directories) and ignore the contents of the directories?

View 2 Replies View Related

General :: Printing From Bash Shell / Concatenate Files Into One File With File Names Included?

May 11, 2011

I am supposed to take some small files, and print them to a specific printer, such that the small files are concatenated into one file. The file name has to be included in the file that gets printed.

Should I be looking to concatenate the files into one file with the file names included, and then print them?

something like: -printfunction -printername < file*

View 7 Replies View Related

General :: Script.sh | Mail - Completes But Doesn't Include Output?

Mar 30, 2011

I have a script that uses cp to copy data from A to B. There are some troublesome files that are constantly in use and read "Permission denied" or "Text file busy" but I'm not worried about these. Therefore my copy process always contains output.The script runs through cron and the output (automatically) goes to /var/mail/user. I tried setting it up to send me an email and it comes through, but it's completely blank. The email in /var/mail/ contains the full output.

Here is my command:
0 18 * * * /home/backup.sh | mail -s "Backup completed" jsteel@...com
(The script simply contains many "cp -r /mnt/location/a /mnt/location/b")

[code]....

View 2 Replies View Related

General :: Message In Terminal After Redirecting Output And Build Completes?

Oct 9, 2010

I'm not sure about the following behavior so thought I would put it out to see if there is an error I need to resolve, or simply a process that I need explained.I'm also not sure if this is an Ubuntu issue, a Linux issue, or other... but here goes.I ran my "make build" in two different ways; one with just "make build" and one with "make build > output" (so I could review the full script).With just "make build" the process finished and returned to the command prompt.

With "make build > output", after the process had finished (script in output document identical to what was in the terminal with "make build") a new set of data was displayed in the terminal (see below).With the other examples of using "make build > output" the times it would parse something back to the terminal window was when there was an error. As I fixed the errors these breaks back to the terminal window would stop. So I'm wondering if this indicates a new error, but because the "make build" now completes successfully (at least it appears to), I'm wondering if this data in the terminal window is just a behavior related to redirecting the output script using the ">" process and something to do with returning to the terminal once a process completes

View 4 Replies View Related

Fedora :: Do Bash Completion Of Package Names In Yum?

Jul 12, 2011

Can fedora do bash completion of package names in yum?

View 4 Replies View Related

Programming :: Bash File Names With Spaces?

Jul 24, 2010

I have a laptop that I am in through SSH. The laptop does not have an Xwindow system so I am using the program fbi to open an image on my laptop screen from my SSH connection:

fbi -T 8 picture.jpg #this opens the image on the laptops tty8 terminal

I've found that making a for loop does not work with files that contain a space in the name. Something to due with a bug that they call a "feature" that stops the first variable at the first whitespace.

Using a "while" loop is not exactly what i require either seeing as I want to be able to view each image in the directory on screen and tag it accordingly, before it jumps off to the next image, and I'm not sure how to add a pause to a while loop.

How do I make a Bash script and loop Variables handle files like "files that contain spaces.jpg"

View 5 Replies View Related

Ubuntu :: Bash - Check If All The File Names Are Correct?

Sep 23, 2010

I have bash script for converting files. I have a problem. If file name is "corrupted" then mv command for that file will not work. For example file with "-" in front of the name.

Is there a way to check if in some folder (subfolder) all the files have correct file names or they don't?

If they are all correct -> OK proceed with execution of the script!

If they are not all correct -> NOT OK stop with execution of the script!

View 4 Replies View Related

Programming :: Bash - Dynamiquely Evaluating Variable Names

May 23, 2011

I'll try to be clear but I think I'm in a mess with my code right now, so it may appear here too

Here is a function. The part I want you to see is the 'eval' sentence.

This works.

It evaluates ${SourceTxt} (which is $1), takes away a part of it and uses it as an array to put data in.

That's alright.

Code:

Now, later, I NEED to count the number of elements in the array(s).

So, I try to do something like....

Which gives me the evaluated name ('#txtFields_email_customers[@]' e.g)

Or

Which gives me nothing....

I was wondering if I was reaching the limits of bash in this kind of capabilities, or if there is a.... bash-like solution. I.e. a good solution

View 7 Replies View Related

Programming :: Bash File Names Different Than Openbox Trash

Feb 14, 2011

Im writing my first bash script. Its function is to move files to the trash can and write a log file in the same format that the system does to allow for file restoration. The problem is that in bash, everything works fine, but in the OpenBox window session, the files are named after the source directory, not the original name. Heres the script:

Code:
#!/bin/bash
# trash - Script to move file or folder to the trash can and create a log file
##### Functions #####
err_output () # Writes error message {
echo "$0: cannot stat `$1': No such file or directory"
echo "USAGE: $0 SOURCE DEST"
exit 1 } >&2

write_log_numbered ()
# Writes log entry for numbered files {
echo "[Trash Info]" > $HOME/.local/share/Trash/info/${FILE}.$max.trashinfo
echo "Path="$PWD >> $HOME/.local/share/Trash/info/${FILE}.$max.trashinfo
echo "DeletionDate="`date "+%Y-%m-%dT%H:%M:%S"` >> $HOME/.local/share/Trash/info/${FILE}.$max.trashinfo
}

write_log_unique () # Writes log entry for unique files {
echo "[Trash Info]" > $HOME/.local/share/Trash/info/${FILE}.trashinfo
echo "Path="$PWD >> $HOME/.local/share/Trash/info/${FILE}.trashinfo
echo "DeletionDate="`date "+%Y-%m-%dT%H:%M:%S"` >> $HOME/.local/share/Trash/info/${FILE}.trashinfo
} make_paths () # Makes necessary folders {
mkdir -p ~/.local/share/Trash
mkdir -p ~/.local/share/Trash/files
mkdir -p ~/.local/share/Trash/info
}

##### Main #####
make_paths
SOURCE="$1"
DEST=$(dirname ~/.local/share/Trash/files/filename)
[ -e "$SOURCE" ] || err_output "$SOURCE"
[ -d "$DEST" ] || err_output "$DEST"
FILE="$(basename "$SOURCE")"

if [ -e "${DEST}/${FILE}" ]; then
max=0 DIR="$(pwd)" cd "$DEST"
shopt -s nullglob for backup in "${FILE}."; do
nr=${backup#${FILE}.}
if [[ "$nr" =~ ^[0-9]+$ ]]; then
if (( nr>max )); then
max="$nr" fi
fi
done
cd "$DIR"
max=$(( max + 1 ))
write_log_numbered
mv -- "$SOURCE" "${DEST}/${FILE}.$max"
else
write_log_unique
mv -- "$SOURCE" "$DEST/${FILE}"
fi

So I run the script with the test file "Junk". In bash, it moves over and its named correctly.
Code:
~/.local/share/Trash/files$ ls
file file.1 Files Files.1 Junk
The log file is also named correctly

Code:
~/.local/share/Trash/info$ ls
file.1.trashinfo Files.1.trashinfo Files.trashinfo file.trashinfo Junk.trashinfo

But, when I go to view the trash can in the file manager in Openbox, the file is called "Testing" which is the name of the source directory. However, if I go to the trashcan via its full path (going to .local/, then share/) all the files are named correctly. Whats going on here? Is there some way to get the trash can to read the correct file name?

View 4 Replies View Related

Programming :: Handle Files With Spaces In Their Names In Bash?

Apr 1, 2011

*I'm using Ubuntu 10.10

My issue is I can't handle the files with spaces in their name, I've donde the below script to print each file found inside folder and subbfolders with "find".

I would like to "ls" to each file found with its complete path and with its basename too.

Code:
files=$(find . -type f)
for each in "$files"
do
ls -l "$each" # 1rst option I've tried to list with full path
ls -l "$(/bin/echo "$each")" # 2nd option I've tried to list with full path
ls -l "$(/bin/echo $(basename "$each"))" # 1nd option I've tried to list with it basename

[Code].....

How can I list "ls -l" in both cases (with full path and with basename) when there are files with spaces in their name?

View 6 Replies View Related

Software :: Customizing Bash Autocomplete (Files And Folder Names)

Jan 6, 2009

Is there a way to customize bash autocomplete such that it avoids searching for commands? I want it to auto complete file and folder names only!

View 2 Replies View Related

General :: Configure Squid With Active Directory?

Apr 14, 2011

How to configure squid with active directory

View 1 Replies View Related

General :: Check If Directory DOES NOT Exist In BASH?

May 10, 2010

i tried to create a if else statements or either an else statement I get a message saying that the directory exists (mkdir: cannot create directory `./MAY2010': File exists I am running this in a crontab file and I dont want any output telling me that the directory exists. I just want to check if the directory doesnt exist, create one else do nothing (not even a message telling me that the directory exists).

[Code]....

View 8 Replies View Related

Ubuntu :: Accessing And Creating Files Names With Nested Loop In Bash?

Aug 12, 2011

nested loop in ''Bash-Scripting in Linux'' ?What's wrong with my code:

for x in `seq 0.75 0.01 0.95`
do
for y in `seq 0.20 0.01 0.40`

[code]....

View 1 Replies View Related

General :: Configure That No Any FTP User Can Access Other FTP Users Directory

Jun 18, 2010

I configured FTP server on Fedora 7.0 . I create different users with different password. I also create seprate directory for each FTP user. All are working . When I use filezilla for connecting that FTP site I can access all the directory on that server.

Now I want to configure that no any FTP user can access other FTP users directory or any other directory in server machine . What I do for this .

View 1 Replies View Related

General :: Bash - Finding Newest File In A Directory?

Aug 24, 2010

Basically, I am trying to locate and copy the newest .json bookmark backup in my .mozilla/firefox/w987sdg9.default/bookmarkbackups directory.

I tried this

Code:

ls -t ~/.mozilla/firefox/b1ahb1ah.default/bookmarkbackups/ | head -1

which does return the newest file, but only the filename itself. I found readlink, but I haven't gotten that to output a full path which I can then feed to copy. So, it seems to me that find might work well here, and I know how to find based on absolute dates, but not relative.

View 2 Replies View Related

CentOS 5 :: Configure Sendmail To Accept Email Without Domain In Local-host-names

Mar 23, 2011

dammit... all that typing and I hit the wrong "submit" button. *sigh*

Ok, I have a couple of SMTP servers for our infrastructure. They are running Postfix. I have them configured so that specific email addresses such as support@mydomain.com and billing@mydomain.com all go to a new support server that I am building with osTicket. Lets call that server SUPP1.

SUPP1 runs sendmail from the default install of CentOS 5 i386. At this point everything runs great. New emails get added into the osTicket system via a pipe in sendmail. Here's where the problem comes in. In order to accept mail, sendmail has to have the domain listed in local-host-names and the addresses in virtusertable. That works just dandy. But in doing so, sendmail believes it is the destination SMTP server for "mydomain.com". That means that I can't send mail from that server back into my normal SMTP servers. So things like the LogWatch, cron jobs, etc can't send notifications. Is there a way to work around that? For sendmail to ignore local-host-names for outbound email or something?

View 1 Replies View Related

Ubuntu :: Directory Exists But Bash Says It Doesn't - No Such File Or Directory

Aug 19, 2011

I've run into a problem with my bash program.

Code:a mkdir -p /home/chris/Downloads/ARCHIVE/`date -I` find /home/chris/Downloads* -mtime +14 -exec "cp {} /home/chris/Downloads/ARCHIVE/`date -I` ;

It's meant to move old files from my Downloads folder into an archive file (later tar them). The directory exists, I've used $PWD and nautilus and ls to make sure it's there, yet for every file it gives

Code: find: `cp /home/chris/Download/foo.bar /home/chris/Downloads/ARCHIVE/2011-08-19': No such file or directory I tried to test it on a different destination, specifically my home folder. IT still gave me the error.IS it a bad syntax within find or something else? I'm running a 32-bit system with 11.04

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved