LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-03-2010, 02:05 PM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Exclamation "ls -s" by an accident


Hi everybody!

Performed
Code:
# ls -s /usr/share/ ~/.icons/default
by an accident. How do I undo it?
 
Old 09-03-2010, 02:06 PM   #2
ruthinman
LQ Newbie
 
Registered: Sep 2010
Posts: 8

Rep: Reputation: 0
harmless

"ls" is just a command to list filenames to the screen... it's nothing to be "undone".
the -s option lets you list them by size.

Last edited by ruthinman; 09-03-2010 at 02:08 PM.
 
Old 09-03-2010, 02:08 PM   #3
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 43
Did you actually do an:

Quote:
ln -s /usr/share/ ~/.icons/default

by chance?
 
Old 09-03-2010, 02:32 PM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
No, I did "ls". So it's not "ln", it's good.
What if I did "ln", how to undo that?
 
Old 09-03-2010, 03:57 PM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
I note that you posted a command that was, apparently, run in a "root" terminal. (Judging from the "#" at the start of the command.)

If that's the case, may I suggest that you "cease-and-desist" running with "root" privileges until you're more familiar with Linux commands? You can do almost everything except make catastrophic mistakes using a regular account, especially if you've added yourself to the sudoers file.

Note that this is advice only. It's your system, and your problem if you mess up.

And, to answer your question, just unlink (with rm)the file that the link command will have created.
 
1 members found this post helpful.
Old 09-03-2010, 04:37 PM   #6
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by Mr. Alex View Post
No, I did "ls". So it's not "ln", it's good.
What if I did "ln", how to undo that?
What made you think that "ls" would damage files?
 
Old 09-03-2010, 09:51 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,340
Blog Entries: 12

Rep: Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730Reputation: 2730
If you did "ln -s [path]," it would do nothing more than create a symbolic link ("symlink") to a folder or file. The resulting link often appears in midnight commander prefaced by a tilde ("~").

You could undo it by deleting the link, either through a graphical file manager or a terminal command.

With an "ls" command, there is nothing to undo.

There is a good section on symlinks in the Slackbook.
 
Old 09-04-2010, 12:18 AM   #8
ruthinman
LQ Newbie
 
Registered: Sep 2010
Posts: 8

Rep: Reputation: 0
Study basic commands first

I have to agree with PTrenholme, you really need to do a little reading before trying out commands logged in as "root". Even a Linux for Dummies book (no insult intended) would be a good place to start. Or a Linux tutorial online. Start with the basic commands... and go from there. I used to teach Unix, and the "ls" command was one of the first ones we teach.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Multicolumn" or "tiles", or even "list" icon view on desktop, in any DE? the dsc Linux - Desktop 3 02-20-2010 10:25 AM
net working eth0 eth1 wlan0 "no connection" "no LAN" "no wi-fi" Cayitano Linux - Newbie 5 12-09-2007 08:11 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 09:31 AM
Any way to get "Alice"; "Call of Duty" series and "Descent 3" to work? JBailey742 Linux - Games 13 06-23-2006 02:34 PM


All times are GMT -5. The time now is 06:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration