Ls Command Lists Each File On Separate Line

Don't know how but now when I use ls I get list of files and directories on their own lines. I want the default behavior I had before. When I cd into another directory I have default behavior - horizontal list of files and folders.


Similar Content



Find Command Fear And Loathing

Its plentiful documentation fails to explain how to use it. After googling all over the world and hunting down examples, it turns out they don't work as the man page indicates if you alter them in the slightest. In fact I know what I want to find, where it is, how to describe it; but the problem is getting find to list that file or those files and moreover making sense of its horrid documentation. It lists too many things. It ignores -prune. It either does nothing or too much. Its a horrible, horrible program, and you are expected to make up the difference by experimentation.

Its so complicated as to make it more worthwhile just to list every file and filter them out with other utilities. Honestly, why go through so much trouble to learn about a command that is as obfuscated as a heartpump?

Sure its great for listing all the files and directories in one subdir, but if you want to exclude multiple dirs or files forget it. Pipe it through grep.

Hidden Folders And Files Become Viewable In Home Directory

Hi guys,
.
For no apparent actions from me, hidden folders and files show
in my /user/home directory, they are as follows:-

folders:
.adobe .cache .config .cups .filezilla .gimp-2.8 .gnupg .gphoto .gstreamer-0.10 .icedtea .java .local .macromedia .mozilla .pki .thumbnails

Files:
.bash_history .bashrc .esd_auth .ICEauthority

In my / directory
File: ./readahead

Seeking help to verify the above folder and files are not from a harmful source or application?

If they do not post any thread to the system, how can I conceal
these folders and files, so that they don't show up any more in
my home and / directory ?

Many thanks.

Connecting To Specific Directory With Filezilla

Hello, I have an embedded linux device. I can connect to the device and I can upload or download files. No problem with this. But, at first connection, I want to connect to "/" directory instead of "/root". In the device file system, there are files ssh_config and sshd_config under /etc/ssh directory. I think I have to do something with these files but I don't know what.

I don't exactly know what mean "/root" and "/" directories. I think that the real root directory is "/" directory which is empty but when I connect with filezilla, the "/root" directory is the default so I had to go back to / directory everytime.

Setting Default Directory Permissions For New Directories

This should be an easy fix and I'm at a loss. I have a directory with 777 permissions on it and currently any directories created inside it default to

drwx--S---

I need to remove the sticky bit and also set any new directory to be readable by group X. How can I do this?

Setfacl Help

I can't believe I wrote a looong message and it logged me out when I tried to submit it.

So anyway, in short lines:

- I have a network of sites where all sites share same "images" folder
- I have created /home/_images/entities and symlinked it from all websites
- It works great with Apache, when I open /images/ on any of the sites I get list of images and can view them

The problem is suPHP which changes process ID of the PHP script to the file owner ID, so when I load site1.com, all scripts are executed as user1 (and files/folders created with those scripts belong to user1:user1). When I load site2.com, all scripts are executed as user2 (and files/folders created with those scripts belong to user2:user2). All these users do NOT belong to the same group, and I wouldn't like to change that as it is cPanel/WHM server so I'm afraid I'll screw something up if I change (primary?) group of all users.

Therefore I need to set it up in such way that all newly created folders and files under /home/_images/entities (owned by root) have read/write permissions for everyone.

Here's the command I used:

Code:
setfacl -Rdm o::rwx /home/_images/entities

To check it:
Code:
root@server1 [~]# getfacl /home/_images/entities/
getfacl: Removing leading '/' from absolute path names
# file: home/_images/entities/
# owner: root
# group: root
user::rwx
group::rwx
other::rwx
default:user::rwx
default:group::rwx
default:other::rwx

This looks fine, however when I try upload an image via site1.com it looks like this:

Code:
root@server1 [/home/_images/entities]# ls -l
total 24
drwxrwxrwx+ 5 root    root    4096 Jan 14 06:25 ./
drwxrwxrwx  5 root    root    4096 Jan 12 13:08 ../
drwxrwxr-x+ 3 user1   user1   4096 Jan 14 06:25 1/

And in folder "1" is the image (and thumbs folder):

Code:
root@server1 [/home/_images/entities/1]# ls -l
total 236
drwxrwxr-x+ 3 user1   user1     4096 Jan 14 06:25 ./
drwxrwxrwx+ 5 root    root      4096 Jan 14 06:25 ../
-rw-rw-rw-  1 user1   user1   225569 Jan 14 06:25 689048f221ab7c556f4d482a9d92b2d6.jpg
drwxrwxr-x+ 2 user1   user1   4096 Jan 14 06:25 thumbs/

My questions:

1) Why newly created folders do not have "write" permissions for everyone else [not user and/or group]? If I upload first image from site1.com, then I can't upload other images from any other site, while all sites can display them.

2) What is the + at the end of permissions list? (drwxrwxr-x+)

3) Why newly created files have only "rw" permissions for user, group AND everyone else, and not execute permissions? I don't actually need execute flag set here, but from my command you can see I've set "o::rwx" so it should be there (or not?)

Actually the real problem is #1 - other users can't write to this folder so users can't upload images from other sites nor other sites can create (missing) thumbnails.

Help With The Modifying Apects Of .bash_profile

I'm new to Linux and I'm trying to learn about .bash_profile. I want to be able to set up various aspects of it, such as setting default permissions for new files, changing the format of the prompt. I also want to modify it so that the current directory is appended to the default PATH.

Can anybody give me a brief rundown on the code/syntax and whatnot for these things?

ex: what is the line that I would need to type so that my prompt is formatted "command number - user - machine name - current directory"?

Command For Generate Files Name In A Directory To TXT File.

Hello.
How can I Generate the files name in a directory into a TXT file? I mean is create a list if files.

Tnx.

Deleting Extra Text Within A Line... (tearing Out Remaining Hair..!)

Hi all,
Im trying to tidy up a web scrape txt file so it just shows the URL's..
As below, I've got most with just the url but struggling to work out how to delete extra txt within a line, without deleting the whole line.
i.e a command that says.. delete from this word.. till end of line .. or delete everything between word1 and word2

//newzealandtrails.com/sites/all/themes/nztrails/css/print.css?nmkrag");
//newzealandtrails.com/sites/all/themes/nztrails/css/tabs.css?nmkrag");
//newzealandtrails.com/sites/default/files/ctools
//newzealandtrails.com/sites/default/files/New20Zealand%20Trails.png" //newzealandtrails.com/sites/default/files/nztrails-logo_0_0.png" alt="New Zealand Trails" /></a></div>
//newzealandtrails.com/welcome-new-zealand-trails" st_title="" class="st_sharethis_button" displayText="sharethis"></span>
//player.vimeo.com/video/71298207" webkitallowfullscreen="" width="500px"></iframe></div>
//w.sharethis.com/button/buttons.js"></script>

Thanks in advance

Extract Only Specific Part From A File

Hello All,

I would like to know if there is a better way to achieve the below task:

Task: Copy lines 10 to 50 from a files that contains 100 lines.

My approach:
1st) use head command and then list first 50 lines and then tail last 40 lines.

2nd) Do a while loop with a counter and then when counter reaches to 10 start writing it to another file up to the point where the counter is 50 and then exit.

I would like to know if there are any other simple and straight approach using which I can directly copy lines 10 to 50.

Help and suggestions on this question are greatly appreciated.

Thanks.

Move And Extract Specific Files From Sub-directories Into Parent Directory.

Hello all.
I have 100 sub-directories that "rar" files exist in them, How can I move all rar files into parent directory?

I used "find sourcedir -type f -exec mv {} targetdir \; " but i just copy one file and all files deleted

Thank you.