Tagged Questions
4
votes
1answer
74 views
Using '@' for a directory name
Though Unix/Linux will technically allow any character in file and directory names, using punctuation is almost always fraught with peril due to the extensive use the O/S makes of punctuation for ...
2
votes
5answers
104 views
move a directory with a single character (back quote) as its name [duplicate]
How can I move a directory whose name is just a space?
ls -lah
drwx------ 4 user1 user1 8.0K Mar 13 14:16 .
drwxr-xr-x 3 root root 60 Mar 13 13:48 ..
drwx------ 18 user1 user1 4.0K Mar 13 11:18 ...
5
votes
3answers
87 views
Filtering redundant paths from a list of paths
I have a list of relative paths such as this:
dir1
dir2
dir2/dir3
dir2/file1
dir3/file2
dir3/dir4
dir3/dir4/file3
In the example above, the specifier dir2/file1 (for example) is redundant, because ...
7
votes
3answers
269 views
What are ./ and ../ directories?
Simple question, but I'm not sure where to look and google doesn't respond to periods and slashes.
I'm just trying to count the # of files & directories in the current directory (not including ...
7
votes
1answer
144 views
What is the significance of the dot in bash commands and how is it different from an asterisk?
I'm trying to understand the significance of the dot in bash and how it differs from an asterisk. Can someone please elaborate? For example, what's the difference between cp -ar /foo/. /foo2/ and cp ...
3
votes
1answer
79 views
Dots in path name
I am recieving an error from an application I am running.
The error looks like this:
john@john-replacement:~/Desktop/yarbu-1.4.8/bin$ sudo yarbu-engine --VERBOSE
/usr/local/bin/yarbu-engine: line ...
0
votes
1answer
70 views
Create a File with Touch on a specific Directory
I want a create a file with a specific extension(.done). I am using the command touch. Something Like:
touch `basename $UNZIPFILE`".done"
It's creating the file but in current directory. I want to ...
4
votes
1answer
215 views
Does tar -x Extract to Current Directory or Does it Extract to the Source of the Archive?
Does tar -x by default just extract to the current directory or does it try to reproduce the original directory structure including overwriting the original source? I know I can specify a folder to ...
1
vote
1answer
182 views
Very basic question, ls a different directory and save file
I seriously can't understand where I'm going wrong with his question. The first part is.
List all the file and directory names in /etc which have 1 or more numbers in their name. Remember to use ...
9
votes
3answers
955 views
When should I use a trailing slash on a directory? [duplicate]
Possible Duplicate:
How linux handles multiple path separators (/home////username///file)
Most commands I use in linux behave exactly the same whether I include the trailing slash / ...
2
votes
2answers
136 views
cp file device:directory on Minix
In my operating systems class we had to modify the boot screen of the Minix OS. I understood just about everything we did, but at the end of the make for compiling the new OS, there's a line:
cp ...
3
votes
3answers
203 views
Need to delete a directory with name '~' created accidentally
I don't remember exactly how this directory got created. It's name is ~, the alternative we all use for home diretory. I also see a sticky bit attached with this directory. How shall I delete it? I ...
4
votes
2answers
649 views
Trailing slashes on symbolic links to directories
I'm trying to emulate the process of path resolution (see man page path_resolution) in unix-like systems.
My OS is Linux with GNU coreutils 8.7.
In order to clarify the meaning of extra trailing '/' ...
1
vote
4answers
320 views
Strange directory name, shown with a backslash
I have copied and pasted a directory of files into another.
The result is now this one development\ /
I do not know what that means? Linux does not even recognize it as a directory now.
Also the ...
4
votes
1answer
183 views
What's the name of the top-level directory
I am using Ubuntu.
I know by using cd ~/ , I can go to home/ directory.
But if I want to go to the directory (I do not know the official name of this directory) which contains etc/, var/, opt/, ... ...
11
votes
4answers
4k views
Converting relative path to absolute path
Is there a *nix command to get absolute(and canonicalized) path from relative path(with current path) or symbolic link?
7
votes
1answer
1k views
Why can't I have a folder and a file with the same name?
I've never had this problem before, but for some reason, I can't rename my folder to packages/.
This is the structure:
root
- packages_old/
- packages
When I try to rename the folder with ...
3
votes
6answers
495 views
finding the absolute directory
Here is the scenario:
foo/
> data/
> stuff/
> scripts/ -> /.../generic/scripts
When calling foo/scripts/bar.sh from any location (other folder or inside the folder), I would like to be ...
4
votes
2answers
65 views
Making a duplicate of a path in Unix
My Unix vocabulary is failing me. I have 5 billion images in /foo/live/images.
For the purposes of developing a new version of the app I'd like to make /foo/dev/images into a working path without ...
4
votes
3answers
158 views
Open files in emacs by filename instead of complete path
Assume I have a bunch of directories and can guarantee that no two directories have a common filename (i.e. if foo/bar exists, then bar doesn't exist in any of the other directories). How can I setup ...
4
votes
1answer
2k views
Recursively compare directory contents by name, ignoring file extensions
I have a directory containing about 7,000 music files. I used lame to recursively re-encode all files in it to a separate directory, outputting all files with the same relative path and file name. ...
33
votes
6answers
3k views
How linux handles multiple path separators (/home////username///file)
I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a ...
8
votes
2answers
716 views
the slash (/) after a directory name on shell commands
I have a little question here.
If I have two files, say filea and fileb, mv filea fileb would
delete fileb
rename filea to fileb
Then if I have two directories, say dira and dirb, mv dira dirb ...

