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


ADVERTISEMENT

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 View Related

Ubuntu :: Bash: /home/randymanme/mozilla/firefox: No Such File Or Directory

May 30, 2010

How can I open the Firefox Profile Manager. I've googled and read but the directions don't work for me:

randymanme@randymanme-desktop:~$ /usr/lib/mozilla/firefox -ProfileManager
bash: /usr/lib/mozilla/firefox: No such file or directory
randymanme@randymanme-desktop:~$ /home/randymanme/mozilla/firefox -ProfileManager

[code]....

View 5 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

Ubuntu :: Bash: Cd: /home/mycomp/.nautilus/python-extensions: No Such File Or Directory

Aug 8, 2010

I was trying to install periscope, from the instructions here: http://code.google.com/p/periscope/wiki/NautilusSupport

The problem is that at:

cd ~/.nautilus/python-extensions

I get an error:

bash: cd: /home/mycomp/.nautilus/python-extensions: No such file or directory

View 6 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

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

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

General :: Unable To Access File /home/username/.iceauthority: No Such File Or Directory

Apr 21, 2011

Can't log into my XFCE desktop like I normaly do. all the sudden I get notified that my xsession lasted less then 10 secondsLooking at the error I can see this:

Unable to access file /home/username/.iceauthority: No such file or directory

Using failsafe I can start a terminal. From terminal I tried to start X

Code: sudo startx Result: Running on desplay:0

So I tried to run this;

Code: sudo startxfce4 And I get up a graphical desktop.

So this is not a critical situation as I easily can use this method to log on, but as there has been something causing this I would like to be able to resolve this nonetheless. Btw it is not the old chmod trick in play here, cause my .iceauthority file is gone alltogheter.

View 6 Replies View Related

Ubuntu :: Ext4 File System Hosed After 11 Upgrade (duplicate Directory & File Names)?

May 8, 2011

I recently upgraded to Ubuntu 11 and a few days later my ecryptfs filesystem began misbehaving in a weird way. In my home directory, many subdirectory names are duplicated verbatim. Here's an ls -F excerpt:

Desktop/
Desktop/
Documents/
Documents/
Downloads/
Downloads/

I can no longer access files in those directories (if I ls the directory, it appears empty; I can cd to it, but there's nothing inside). Not all of the directories are duplicated/damaged like this, but most are. A few non-directory files are also duplicated in this fashion, so for example:

[Code]...

View 5 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

General :: Testing Home Directory Scripts By Setting $HOME To The Location Of The Test Directory

Apr 20, 2010

I have an interdependent collection of scripts in my ~/bin directory as well as a developed ~/.vim directory and some other libraries and such in other subdirectories. I've been versioning all of this using git, and have realized that it would be potentially very easy and useful to do development and testing of new and existing scripts, vim plugins, etc. using a cloned repo, and then pull the working code into my actual home directory with a merge.

The easiest way to do this would seem to be to just change & export $HOME, eg

cd ~/testing; git clone ~ home
export HOME=~/testing/home
cd ~
screen -S testing-home
# start vim, write/revise plugins, edit scripts, etc.
# test revisions

However since I've never tried this before I'm concerned that some programs, environment variables, etc., may end up using my actual home directory instead of the exported one. Is this a viable strategy? Are there just a few outliers that I should be careful about?

View 1 Replies View Related

General :: Execute Bash File - Always Back To Home Dir?

Apr 11, 2010

In my bash file I have asked to navigate to some subdir, unzip a file and stay there but when I type pwd I can see i'm always back to home dir.Any way to get shell stick to subdir?

View 4 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 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

Fedora :: Set My .bash Home Directory?

Nov 29, 2009

Every time I start a terminal it defaults to my Documents directory and I would prefer it default to my /home/thisuser directory instead. Anyone know how to set that? I tried looking in .bash_profile and didn't see anything. Nor did the man page have anything that seemed like what I was trying to do...

View 14 Replies View Related

General :: Link Home Directory To Different File-system?

Aug 27, 2009

I'm looking for some advice about how to implement the following functionality in my pet project.

There are two users on my system, user1 and user2. When user1 logs in he can do what he wants etc.. when user2 logs in I want to somehow link the entire file system to another place. In more detail when user2 logs in and does something like ls ~, he should see contents of /home/user1/extra/home/user2/ instead of /home/user2/
and when user2 does ls /usr/bin he should see contents of /home/user1/extra/usr/bin/

Is there a simple way to do this kind of operation. I have looked up the ln command, but I am a little unsure about how to show a completely different file structure to a particular user.

I did play around with ln and found that you can make "soft links" to directories. The problem being how can I link the user2 home directory /home/user2 to something like /home/user1/buffer/home/user2 . can I use something like ln -s /home/user1/buffer/home/user2 /home/user2 .. I guess not. I didn't want to try it as I wasn't sure so as to not hose my system.

View 14 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

Fedora :: F12 Cannot Show Chinese File Or Directory Names

Dec 1, 2009

I recently installed the F12, but it cannot correctly show the Chinese file and directory names on a Windows partition with a fat32 file system. What shall I do?

The disk partition is mounted as

Code:
UUID=471D-E212 /mnt/d vfat umask=0022,uid=xxx,gid=xxx 0 0
in the /etc/fstab.

View 4 Replies View Related

General :: Made A File Named * In My Home Directory / Remove It?

Oct 19, 2009

how do i remove it?

View 4 Replies View Related

General :: Cannot Move A File Into My Archives Directory In Bash Scrip

Apr 12, 2010

I cannot move a my file into my archives directory in my bash scrip.

View 7 Replies View Related

General :: Remove Index.html File Alone In Every Directory Via Bash Script

Jul 7, 2011

I want to remove the index.html file alone in the every directory via bash script, for example i have 5 directories in the path /var/www/vhost

anish
kumar
linux
question
friend

each directories have index.html file now i want to replace the index.html file alone from the other directory /var/tmp/vhosbak

anish
kumar
linux
question
friend

How we can do this using script?

View 5 Replies View Related

General :: Using For The Server - Bash: /etc/init.d/dhcpd.conf: No Such File Or Directory

Aug 24, 2010

# /etc/init.d/dhcpd.conf -bash: /etc/init.d/dhcpd.conf: No such file or directory what is the problem? and how to configure out "joe"

View 5 Replies View Related

Software :: Convert Directory Structure From Long File Names In System To DOS 8.3?

Sep 2, 2009

I've been looking high and low for a utility program or perl script or something that can take a linux directory structure as input and convert it to MS-DOS 8.3 directory structure.

The purpose of this is to conform to the path format that is expected on my rather old Creative Zen Neeon MP3 player for m3u play lists.

View 5 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

General :: Command To Copy The File Practice.txt To A New Name Of Myfile.txt While In The Home Directory-found

Nov 15, 2010

-the command to copy the file Practice.txt to a new name of Myfile.txt while in the home directory-found
-command to create a directory in the home directory-found
-say i just created a new directory called "test". whats the command to delete the test directory.-found
-command to create a blank, text file without using an editor.
-the exact syntax in Linux you would need to rename the file to a new name-found

View 4 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

Ubuntu :: Help With Bin File - Error Message - Bash - /hldsupdatetool.bin - No Such File Or Directory

Jun 9, 2009

I am new to Linux and I wanted to setup a dedicated game server on my notebook.

I've installed Ubuntu 9.04. I than created a directory named /home/phlex/kfserver. I downloaded the application binary from Steam. I changed the file permission with chmod +x hldsupdatetool.bin and now the file attributes are -rwxr-xr-x.

The problem is when I try to run the binary file. If I type ./hldsupdatetool.bin I get an error message "-bash: ./hldsupdatetool.bin: No such file or directory. It seems the OS can't find the file. I've downloaded the file several times thinking it may have been corrupt but it's not. I can delete the file, I can rename it and so the file is there. Sometimes Linux can be aggravating to use.

View 7 Replies View Related

General :: 'Could Not Chdir To Home Directory /home/[user]: Permission Denied'

Jan 6, 2010

I have a secondary disk which holds a /home directory structure from a previous install of Linux. I installed a new version on a new primary drive and mounted this secondary drive as the new /home. Problem is, even though the users are the same names and I can access the home directories for the users, I cannot login directly to their home directories, as I get the following error: -

Code:

login as: [me]
[me]@[machine]'s password:
Last login: Wed Jan 6 18:34:33 2010 from [machine]
Could not chdir to home directory /home/[me]: Permission denied
[[me]@[machine] /]$

Now, since the usernames are correct and the users are in the passwd file with the correct home directory paths, could it be user ID's that are different or something else? It's not as though I cannot access the home directories for the users, simply that I cannot log directly into them from a login prompt.

View 14 Replies View Related







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